Changeset 142061 in webkit
- Timestamp:
- Feb 6, 2013 6:43:55 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r142057 r142061 1 2013-02-06 Kentaro Hara <haraken@chromium.org> 2 3 [V8] Make an Isolate parameter mandatory in GetTemplate() and GetRawTemplate() 4 https://bugs.webkit.org/show_bug.cgi?id=109026 5 6 Reviewed by Adam Barth. 7 8 Now it's time to kill an optional Isolate parameter. 9 10 No tests. No change in behavior. 11 12 * bindings/scripts/CodeGeneratorV8.pm: 13 (GenerateHeader): 14 (GenerateNamedConstructorCallback): 15 (GenerateImplementation): 16 * bindings/scripts/test/V8/V8Float64Array.cpp: 17 (WebCore::V8Float64Array::GetRawTemplate): 18 (WebCore::V8Float64Array::GetTemplate): 19 * bindings/scripts/test/V8/V8Float64Array.h: 20 (V8Float64Array): 21 (WebCore::V8Float64Array::installPerContextPrototypeProperties): 22 * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: 23 (WebCore::V8TestActiveDOMObject::GetRawTemplate): 24 (WebCore::V8TestActiveDOMObject::GetTemplate): 25 * bindings/scripts/test/V8/V8TestActiveDOMObject.h: 26 (V8TestActiveDOMObject): 27 (WebCore::V8TestActiveDOMObject::installPerContextPrototypeProperties): 28 * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: 29 (WebCore::V8TestCustomNamedGetter::GetRawTemplate): 30 (WebCore::V8TestCustomNamedGetter::GetTemplate): 31 * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: 32 (V8TestCustomNamedGetter): 33 (WebCore::V8TestCustomNamedGetter::installPerContextPrototypeProperties): 34 * bindings/scripts/test/V8/V8TestEventConstructor.cpp: 35 (WebCore::V8TestEventConstructor::GetRawTemplate): 36 (WebCore::V8TestEventConstructor::GetTemplate): 37 * bindings/scripts/test/V8/V8TestEventConstructor.h: 38 (V8TestEventConstructor): 39 (WebCore::V8TestEventConstructor::installPerContextPrototypeProperties): 40 * bindings/scripts/test/V8/V8TestEventTarget.cpp: 41 (WebCore::V8TestEventTarget::GetRawTemplate): 42 (WebCore::V8TestEventTarget::GetTemplate): 43 * bindings/scripts/test/V8/V8TestEventTarget.h: 44 (V8TestEventTarget): 45 (WebCore::V8TestEventTarget::installPerContextPrototypeProperties): 46 * bindings/scripts/test/V8/V8TestException.cpp: 47 (WebCore::V8TestException::GetRawTemplate): 48 (WebCore::V8TestException::GetTemplate): 49 * bindings/scripts/test/V8/V8TestException.h: 50 (V8TestException): 51 (WebCore::V8TestException::installPerContextPrototypeProperties): 52 * bindings/scripts/test/V8/V8TestInterface.cpp: 53 (WebCore::V8TestInterface::GetRawTemplate): 54 (WebCore::V8TestInterface::GetTemplate): 55 * bindings/scripts/test/V8/V8TestInterface.h: 56 (V8TestInterface): 57 (WebCore::V8TestInterface::installPerContextPrototypeProperties): 58 * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: 59 (WebCore::V8TestMediaQueryListListener::GetRawTemplate): 60 (WebCore::V8TestMediaQueryListListener::GetTemplate): 61 * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: 62 (V8TestMediaQueryListListener): 63 (WebCore::V8TestMediaQueryListListener::installPerContextPrototypeProperties): 64 * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: 65 (WebCore::V8TestNamedConstructorConstructor::GetTemplate): 66 (WebCore::V8TestNamedConstructor::GetRawTemplate): 67 (WebCore::V8TestNamedConstructor::GetTemplate): 68 * bindings/scripts/test/V8/V8TestNamedConstructor.h: 69 (V8TestNamedConstructor): 70 (WebCore::V8TestNamedConstructor::installPerContextPrototypeProperties): 71 * bindings/scripts/test/V8/V8TestNode.cpp: 72 (WebCore::V8TestNode::GetRawTemplate): 73 (WebCore::V8TestNode::GetTemplate): 74 * bindings/scripts/test/V8/V8TestNode.h: 75 (V8TestNode): 76 (WebCore::V8TestNode::installPerContextPrototypeProperties): 77 * bindings/scripts/test/V8/V8TestObj.cpp: 78 (WebCore::V8TestObj::GetRawTemplate): 79 (WebCore::V8TestObj::GetTemplate): 80 (WebCore::V8TestObj::installPerContextPrototypeProperties): 81 * bindings/scripts/test/V8/V8TestObj.h: 82 (V8TestObj): 83 * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp: 84 (WebCore::V8TestOverloadedConstructors::GetRawTemplate): 85 (WebCore::V8TestOverloadedConstructors::GetTemplate): 86 * bindings/scripts/test/V8/V8TestOverloadedConstructors.h: 87 (V8TestOverloadedConstructors): 88 (WebCore::V8TestOverloadedConstructors::installPerContextPrototypeProperties): 89 * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: 90 (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate): 91 (WebCore::V8TestSerializedScriptValueInterface::GetTemplate): 92 * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: 93 (V8TestSerializedScriptValueInterface): 94 (WebCore::V8TestSerializedScriptValueInterface::installPerContextPrototypeProperties): 95 * bindings/v8/V8PerContextData.cpp: 96 (WebCore::V8PerContextData::constructorForTypeSlowCase): 97 * bindings/v8/WrapperTypeInfo.h: 98 (WebCore): 99 (WebCore::WrapperTypeInfo::installPerContextPrototypeProperties): 100 1 101 2013-02-06 Terry Anderson <tdanderson@chromium.org> 2 102 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r141977 r142061 355 355 push(@headerContent, <<END); 356 356 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 357 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);358 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);357 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 358 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 359 359 static ${nativeType}* toNative(v8::Handle<v8::Object> object) 360 360 { … … 465 465 if (@enabledPerContextFunctions) { 466 466 push(@headerContent, <<END); 467 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> );467 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*); 468 468 END 469 469 } else { 470 470 push(@headerContent, <<END); 471 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }471 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 472 472 END 473 473 } … … 2196 2196 v8::Persistent<v8::FunctionTemplate> ${v8InterfaceName}Constructor::GetTemplate(v8::Isolate* isolate) 2197 2197 { 2198 if (!isolate)2199 isolate = v8::Isolate::GetCurrent();2200 2198 static v8::Persistent<v8::FunctionTemplate> cachedTemplate; 2201 2199 if (!cachedTemplate.IsEmpty()) … … 3101 3099 v8::Persistent<v8::FunctionTemplate> ${v8InterfaceName}::GetRawTemplate(v8::Isolate* isolate) 3102 3100 { 3103 if (!isolate)3104 isolate = v8::Isolate::GetCurrent();3105 3101 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 3106 3102 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 3116 3112 v8::Persistent<v8::FunctionTemplate> ${v8InterfaceName}::GetTemplate(v8::Isolate* isolate) 3117 3113 { 3118 if (!isolate)3119 isolate = v8::Isolate::GetCurrent();3120 3114 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 3121 3115 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); … … 3168 3162 if (@enabledPerContextFunctions) { 3169 3163 push(@implContent, <<END); 3170 void ${v8InterfaceName}::installPerContextPrototypeProperties(v8::Handle<v8::Object> proto )3164 void ${v8InterfaceName}::installPerContextPrototypeProperties(v8::Handle<v8::Object> proto, v8::Isolate* isolate) 3171 3165 { 3172 3166 UNUSED_PARAM(proto); … … 3174 3168 # Setup the enable-by-settings functions if we have them 3175 3169 push(@implContent, <<END); 3176 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate( ));3170 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate(isolate)); 3177 3171 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. 3178 3172 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp
r141977 r142061 135 135 v8::Persistent<v8::FunctionTemplate> V8Float64Array::GetRawTemplate(v8::Isolate* isolate) 136 136 { 137 if (!isolate)138 isolate = v8::Isolate::GetCurrent();139 137 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 140 138 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 150 148 v8::Persistent<v8::FunctionTemplate> V8Float64Array::GetTemplate(v8::Isolate* isolate) 151 149 { 152 if (!isolate)153 isolate = v8::Isolate::GetCurrent();154 150 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 155 151 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.h
r141945 r142061 37 37 static const bool hasDependentLifetime = V8ArrayBufferView::hasDependentLifetime; 38 38 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 39 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);40 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);39 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 40 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 41 41 static Float64Array* toNative(v8::Handle<v8::Object> object) 42 42 { … … 48 48 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; 49 49 static void installPerContextProperties(v8::Handle<v8::Object>, Float64Array*, v8::Isolate*) { } 50 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }50 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 51 51 private: 52 52 friend v8::Handle<v8::Object> wrap(Float64Array*, v8::Handle<v8::Object> creationContext, v8::Isolate*); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp
r141977 r142061 163 163 v8::Persistent<v8::FunctionTemplate> V8TestActiveDOMObject::GetRawTemplate(v8::Isolate* isolate) 164 164 { 165 if (!isolate)166 isolate = v8::Isolate::GetCurrent();167 165 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 168 166 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 178 176 v8::Persistent<v8::FunctionTemplate> V8TestActiveDOMObject::GetTemplate(v8::Isolate* isolate) 179 177 { 180 if (!isolate)181 isolate = v8::Isolate::GetCurrent();182 178 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 183 179 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h
r141945 r142061 36 36 static const bool hasDependentLifetime = false; 37 37 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 40 40 static TestActiveDOMObject* toNative(v8::Handle<v8::Object> object) 41 41 { … … 48 48 static bool indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t index, v8::AccessType, v8::Local<v8::Value> data); 49 49 static void installPerContextProperties(v8::Handle<v8::Object>, TestActiveDOMObject*, v8::Isolate*) { } 50 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }50 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 51 51 private: 52 52 friend v8::Handle<v8::Object> wrap(TestActiveDOMObject*, v8::Handle<v8::Object> creationContext, v8::Isolate*); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp
r141977 r142061 101 101 v8::Persistent<v8::FunctionTemplate> V8TestCustomNamedGetter::GetRawTemplate(v8::Isolate* isolate) 102 102 { 103 if (!isolate)104 isolate = v8::Isolate::GetCurrent();105 103 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 106 104 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 116 114 v8::Persistent<v8::FunctionTemplate> V8TestCustomNamedGetter::GetTemplate(v8::Isolate* isolate) 117 115 { 118 if (!isolate)119 isolate = v8::Isolate::GetCurrent();120 116 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 121 117 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.h
r141945 r142061 36 36 static const bool hasDependentLifetime = false; 37 37 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 40 40 static TestCustomNamedGetter* toNative(v8::Handle<v8::Object> object) 41 41 { … … 47 47 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; 48 48 static void installPerContextProperties(v8::Handle<v8::Object>, TestCustomNamedGetter*, v8::Isolate*) { } 49 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }49 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 50 50 private: 51 51 friend v8::Handle<v8::Object> wrap(TestCustomNamedGetter*, v8::Handle<v8::Object> creationContext, v8::Isolate*); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp
r141977 r142061 133 133 v8::Persistent<v8::FunctionTemplate> V8TestEventConstructor::GetRawTemplate(v8::Isolate* isolate) 134 134 { 135 if (!isolate)136 isolate = v8::Isolate::GetCurrent();137 135 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 138 136 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 148 146 v8::Persistent<v8::FunctionTemplate> V8TestEventConstructor::GetTemplate(v8::Isolate* isolate) 149 147 { 150 if (!isolate)151 isolate = v8::Isolate::GetCurrent();152 148 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 153 149 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.h
r141945 r142061 37 37 static const bool hasDependentLifetime = false; 38 38 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 39 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);40 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);39 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 40 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 41 41 static TestEventConstructor* toNative(v8::Handle<v8::Object> object) 42 42 { … … 48 48 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; 49 49 static void installPerContextProperties(v8::Handle<v8::Object>, TestEventConstructor*, v8::Isolate*) { } 50 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }50 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 51 51 private: 52 52 friend v8::Handle<v8::Object> wrap(TestEventConstructor*, v8::Handle<v8::Object> creationContext, v8::Isolate*); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp
r141977 r142061 162 162 v8::Persistent<v8::FunctionTemplate> V8TestEventTarget::GetRawTemplate(v8::Isolate* isolate) 163 163 { 164 if (!isolate)165 isolate = v8::Isolate::GetCurrent();166 164 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 167 165 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 177 175 v8::Persistent<v8::FunctionTemplate> V8TestEventTarget::GetTemplate(v8::Isolate* isolate) 178 176 { 179 if (!isolate)180 isolate = v8::Isolate::GetCurrent();181 177 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 182 178 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.h
r141945 r142061 36 36 static const bool hasDependentLifetime = false; 37 37 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 40 40 static TestEventTarget* toNative(v8::Handle<v8::Object> object) 41 41 { … … 50 50 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 1; 51 51 static void installPerContextProperties(v8::Handle<v8::Object>, TestEventTarget*, v8::Isolate*) { } 52 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }52 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 53 53 private: 54 54 friend v8::Handle<v8::Object> wrap(TestEventTarget*, v8::Handle<v8::Object> creationContext, v8::Isolate*); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp
r141977 r142061 92 92 v8::Persistent<v8::FunctionTemplate> V8TestException::GetRawTemplate(v8::Isolate* isolate) 93 93 { 94 if (!isolate)95 isolate = v8::Isolate::GetCurrent();96 94 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 97 95 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 107 105 v8::Persistent<v8::FunctionTemplate> V8TestException::GetTemplate(v8::Isolate* isolate) 108 106 { 109 if (!isolate)110 isolate = v8::Isolate::GetCurrent();111 107 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 112 108 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.h
r141945 r142061 36 36 static const bool hasDependentLifetime = false; 37 37 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 40 40 static TestException* toNative(v8::Handle<v8::Object> object) 41 41 { … … 46 46 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; 47 47 static void installPerContextProperties(v8::Handle<v8::Object>, TestException*, v8::Isolate*) { } 48 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }48 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 49 49 private: 50 50 friend v8::Handle<v8::Object> wrap(TestException*, v8::Handle<v8::Object> creationContext, v8::Isolate*); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
r141977 r142061 317 317 v8::Persistent<v8::FunctionTemplate> V8TestInterface::GetRawTemplate(v8::Isolate* isolate) 318 318 { 319 if (!isolate)320 isolate = v8::Isolate::GetCurrent();321 319 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 322 320 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 332 330 v8::Persistent<v8::FunctionTemplate> V8TestInterface::GetTemplate(v8::Isolate* isolate) 333 331 { 334 if (!isolate)335 isolate = v8::Isolate::GetCurrent();336 332 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 337 333 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.h
r141945 r142061 38 38 static const bool hasDependentLifetime = true; 39 39 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 40 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);41 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);40 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 41 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 42 42 static TestInterface* toNative(v8::Handle<v8::Object> object) 43 43 { … … 51 51 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; 52 52 static void installPerContextProperties(v8::Handle<v8::Object>, TestInterface*, v8::Isolate*) { } 53 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }53 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 54 54 private: 55 55 friend v8::Handle<v8::Object> wrap(TestInterface*, v8::Handle<v8::Object> creationContext, v8::Isolate*); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
r141977 r142061 101 101 v8::Persistent<v8::FunctionTemplate> V8TestMediaQueryListListener::GetRawTemplate(v8::Isolate* isolate) 102 102 { 103 if (!isolate)104 isolate = v8::Isolate::GetCurrent();105 103 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 106 104 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 116 114 v8::Persistent<v8::FunctionTemplate> V8TestMediaQueryListListener::GetTemplate(v8::Isolate* isolate) 117 115 { 118 if (!isolate)119 isolate = v8::Isolate::GetCurrent();120 116 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 121 117 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.h
r141945 r142061 36 36 static const bool hasDependentLifetime = false; 37 37 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 40 40 static TestMediaQueryListListener* toNative(v8::Handle<v8::Object> object) 41 41 { … … 46 46 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; 47 47 static void installPerContextProperties(v8::Handle<v8::Object>, TestMediaQueryListListener*, v8::Isolate*) { } 48 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }48 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 49 49 private: 50 50 friend v8::Handle<v8::Object> wrap(TestMediaQueryListListener*, v8::Handle<v8::Object> creationContext, v8::Isolate*); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp
r141977 r142061 101 101 v8::Persistent<v8::FunctionTemplate> V8TestNamedConstructorConstructor::GetTemplate(v8::Isolate* isolate) 102 102 { 103 if (!isolate)104 isolate = v8::Isolate::GetCurrent();105 103 static v8::Persistent<v8::FunctionTemplate> cachedTemplate; 106 104 if (!cachedTemplate.IsEmpty()) … … 137 135 v8::Persistent<v8::FunctionTemplate> V8TestNamedConstructor::GetRawTemplate(v8::Isolate* isolate) 138 136 { 139 if (!isolate)140 isolate = v8::Isolate::GetCurrent();141 137 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 142 138 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 152 148 v8::Persistent<v8::FunctionTemplate> V8TestNamedConstructor::GetTemplate(v8::Isolate* isolate) 153 149 { 154 if (!isolate)155 isolate = v8::Isolate::GetCurrent();156 150 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 157 151 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.h
r141945 r142061 42 42 static const bool hasDependentLifetime = true; 43 43 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 44 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);45 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);44 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 45 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 46 46 static TestNamedConstructor* toNative(v8::Handle<v8::Object> object) 47 47 { … … 53 53 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; 54 54 static void installPerContextProperties(v8::Handle<v8::Object>, TestNamedConstructor*, v8::Isolate*) { } 55 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }55 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 56 56 private: 57 57 friend v8::Handle<v8::Object> wrap(TestNamedConstructor*, v8::Handle<v8::Object> creationContext, v8::Isolate*); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp
r141977 r142061 99 99 v8::Persistent<v8::FunctionTemplate> V8TestNode::GetRawTemplate(v8::Isolate* isolate) 100 100 { 101 if (!isolate)102 isolate = v8::Isolate::GetCurrent();103 101 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 104 102 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 114 112 v8::Persistent<v8::FunctionTemplate> V8TestNode::GetTemplate(v8::Isolate* isolate) 115 113 { 116 if (!isolate)117 isolate = v8::Isolate::GetCurrent();118 114 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 119 115 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.h
r141945 r142061 36 36 static const bool hasDependentLifetime = true; 37 37 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 40 40 static TestNode* toNative(v8::Handle<v8::Object> object) 41 41 { … … 48 48 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; 49 49 static void installPerContextProperties(v8::Handle<v8::Object>, TestNode*, v8::Isolate*) { } 50 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }50 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 51 51 private: 52 52 friend v8::Handle<v8::Object> wrap(TestNode*, v8::Handle<v8::Object> creationContext, v8::Isolate*); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
r141977 r142061 2213 2213 v8::Persistent<v8::FunctionTemplate> V8TestObj::GetRawTemplate(v8::Isolate* isolate) 2214 2214 { 2215 if (!isolate)2216 isolate = v8::Isolate::GetCurrent();2217 2215 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 2218 2216 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 2228 2226 v8::Persistent<v8::FunctionTemplate> V8TestObj::GetTemplate(v8::Isolate* isolate) 2229 2227 { 2230 if (!isolate)2231 isolate = v8::Isolate::GetCurrent();2232 2228 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 2233 2229 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); … … 2266 2262 } 2267 2263 2268 void V8TestObj::installPerContextPrototypeProperties(v8::Handle<v8::Object> proto )2264 void V8TestObj::installPerContextPrototypeProperties(v8::Handle<v8::Object> proto, v8::Isolate* isolate) 2269 2265 { 2270 2266 UNUSED_PARAM(proto); 2271 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate( ));2267 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate(isolate)); 2272 2268 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. 2273 2269 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.h
r141945 r142061 36 36 static const bool hasDependentLifetime = false; 37 37 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 40 40 static TestObj* toNative(v8::Handle<v8::Object> object) 41 41 { … … 52 52 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; 53 53 static void installPerContextProperties(v8::Handle<v8::Object>, TestObj*, v8::Isolate*); 54 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> );54 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*); 55 55 private: 56 56 friend v8::Handle<v8::Object> wrap(TestObj*, v8::Handle<v8::Object> creationContext, v8::Isolate*); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp
r141977 r142061 156 156 v8::Persistent<v8::FunctionTemplate> V8TestOverloadedConstructors::GetRawTemplate(v8::Isolate* isolate) 157 157 { 158 if (!isolate)159 isolate = v8::Isolate::GetCurrent();160 158 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 161 159 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 171 169 v8::Persistent<v8::FunctionTemplate> V8TestOverloadedConstructors::GetTemplate(v8::Isolate* isolate) 172 170 { 173 if (!isolate)174 isolate = v8::Isolate::GetCurrent();175 171 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 176 172 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.h
r141945 r142061 36 36 static const bool hasDependentLifetime = false; 37 37 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);38 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 40 40 static TestOverloadedConstructors* toNative(v8::Handle<v8::Object> object) 41 41 { … … 47 47 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; 48 48 static void installPerContextProperties(v8::Handle<v8::Object>, TestOverloadedConstructors*, v8::Isolate*) { } 49 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }49 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 50 50 private: 51 51 static v8::Handle<v8::Value> constructor1Callback(const v8::Arguments&); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
r141977 r142061 274 274 v8::Persistent<v8::FunctionTemplate> V8TestSerializedScriptValueInterface::GetRawTemplate(v8::Isolate* isolate) 275 275 { 276 if (!isolate)277 isolate = v8::Isolate::GetCurrent();278 276 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 279 277 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info); … … 289 287 v8::Persistent<v8::FunctionTemplate> V8TestSerializedScriptValueInterface::GetTemplate(v8::Isolate* isolate) 290 288 { 291 if (!isolate)292 isolate = v8::Isolate::GetCurrent();293 289 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 294 290 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h
r141945 r142061 38 38 static const bool hasDependentLifetime = false; 39 39 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*); 40 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate* = 0);41 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate* = 0);40 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*); 41 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*); 42 42 static TestSerializedScriptValueInterface* toNative(v8::Handle<v8::Object> object) 43 43 { … … 49 49 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; 50 50 static void installPerContextProperties(v8::Handle<v8::Object>, TestSerializedScriptValueInterface*, v8::Isolate*) { } 51 static void installPerContextPrototypeProperties(v8::Handle<v8::Object> ) { }51 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { } 52 52 private: 53 53 friend v8::Handle<v8::Object> wrap(TestSerializedScriptValueInterface*, v8::Handle<v8::Object> creationContext, v8::Isolate*); -
trunk/Source/WebCore/bindings/v8/V8DOMWrapper.cpp
r141977 r142061 85 85 86 86 V8PerContextData* perContextData = V8PerContextData::from(scope.context()); 87 v8::Local<v8::Object> wrapper = perContextData ? perContextData->createWrapperFromCache(type) : V8ObjectConstructor::newInstance(type->getTemplate( )->GetFunction());87 v8::Local<v8::Object> wrapper = perContextData ? perContextData->createWrapperFromCache(type) : V8ObjectConstructor::newInstance(type->getTemplate(isolate)->GetFunction()); 88 88 89 89 if (type == &V8HTMLDocument::info && !wrapper.IsEmpty()) -
trunk/Source/WebCore/bindings/v8/V8PerContextData.cpp
r134351 r142061 115 115 116 116 v8::Context::Scope scope(m_context); 117 v8::Handle<v8::FunctionTemplate> functionTemplate = type->getTemplate( );117 v8::Handle<v8::FunctionTemplate> functionTemplate = type->getTemplate(m_context->GetIsolate()); 118 118 // Getting the function might fail if we're running out of stack or memory. 119 119 v8::TryCatch tryCatch; … … 126 126 if (!prototypeValue.IsEmpty() && prototypeValue->IsObject()) { 127 127 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(prototypeValue); 128 type->installPerContextPrototypeProperties(prototypeObject );128 type->installPerContextPrototypeProperties(prototypeObject, m_context->GetIsolate()); 129 129 if (type->wrapperTypePrototype == WrapperTypeErrorPrototype) 130 130 prototypeObject->SetPrototype(m_errorPrototype.get()); -
trunk/Source/WebCore/bindings/v8/WrapperTypeInfo.h
r141857 r142061 52 52 typedef EventTarget* (*ToEventTargetFunction)(v8::Handle<v8::Object>); 53 53 typedef void* (*OpaqueRootForGC)(void*, v8::Persistent<v8::Object>, v8::Isolate*); 54 typedef void (*InstallPerContextPrototypePropertiesFunction)(v8::Handle<v8::Object> );54 typedef void (*InstallPerContextPrototypePropertiesFunction)(v8::Handle<v8::Object>, v8::Isolate*); 55 55 56 56 enum WrapperTypePrototype { … … 85 85 } 86 86 87 v8::Persistent<v8::FunctionTemplate> getTemplate(v8::Isolate* isolate = 0) { return getTemplateFunction(isolate); }87 v8::Persistent<v8::FunctionTemplate> getTemplate(v8::Isolate* isolate) { return getTemplateFunction(isolate); } 88 88 89 89 void derefObject(void* object) … … 93 93 } 94 94 95 void installPerContextPrototypeProperties(v8::Handle<v8::Object> proto )95 void installPerContextPrototypeProperties(v8::Handle<v8::Object> proto, v8::Isolate* isolate) 96 96 { 97 97 if (installPerContextPrototypePropertiesFunction) 98 installPerContextPrototypePropertiesFunction(proto );98 installPerContextPrototypePropertiesFunction(proto, isolate); 99 99 } 100 100
Note: See TracChangeset
for help on using the changeset viewer.