Changeset 91194 in webkit for trunk/Source/JavaScriptCore/API/JSCallbackObject.h
- Timestamp:
- Jul 18, 2011, 10:47:13 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSCallbackObject.h
r87588 r91194 117 117 template <class Base> 118 118 class JSCallbackObject : public Base { 119 p ublic:119 protected: 120 120 JSCallbackObject(ExecState*, JSGlobalObject*, Structure*, JSClassRef, void* data); 121 121 JSCallbackObject(JSGlobalData&, JSClassRef, Structure*); 122 // We'd like to use the placement version of operator new defined in JSCell, but 123 // we can't because Base is a template argument, so we just duplicate the same 124 // functionality here. 125 void* operator new(size_t, void* ptr) { return ptr; } 126 127 public: 128 static JSCallbackObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef classRef, void* data) 129 { 130 return new (allocateCell<JSCallbackObject>(*exec->heap())) JSCallbackObject(exec, globalObject, structure, classRef, data); 131 } 132 static JSCallbackObject* create(JSGlobalData& globalData, JSClassRef classRef, Structure* structure) 133 { 134 return new (allocateCell<JSCallbackObject>(globalData.heap)) JSCallbackObject(globalData, classRef, structure); 135 } 122 136 123 137 void setPrivate(void* data);
Note:
See TracChangeset
for help on using the changeset viewer.