Changeset 118129 in webkit
- Timestamp:
- May 22, 2012 11:36:10 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r118128 r118129 1 2012-05-22 Kentaro Hara <haraken@chromium.org> 2 3 [V8] Pass Isolate to v8::Null() in CodeGeneratorV8.pm 4 https://bugs.webkit.org/show_bug.cgi?id=87202 5 6 Reviewed by Adam Barth. 7 8 The objective is to pass Isolate around in V8 bindings. 9 This patch passes Isolate to v8::Null() in CodeGeneratorV8.pm. 10 11 No tests. No change in behavior. 12 13 * bindings/scripts/CodeGeneratorV8.pm: 14 (GenerateNormalAttrGetter): 15 (GenerateFunctionCallback): 16 (NativeToJSValue): 17 * bindings/scripts/test/V8/V8TestObj.cpp: 18 (WebCore::TestObjV8Internal::contentDocumentAttrGetter): 19 (WebCore::TestObjV8Internal::getSVGDocumentCallback): 20 * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: 21 (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter): 22 (WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter): 23 (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter): 24 (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter): 25 1 26 2012-05-22 Andreas Kling <kling@webkit.org> 2 27 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r118120 r118129 843 843 # Generate security checks if necessary 844 844 if ($attribute->signature->extendedAttributes->{"CheckSecurityForNode"}) { 845 push(@implContentDecls, " if (!V8BindingSecurity::shouldAllowAccessToNode(V8BindingState::Only(), imp->" . $attribute->signature->name . "()))\n return v8::Handle<v8::Value>(v8::Null( ));\n\n");845 push(@implContentDecls, " if (!V8BindingSecurity::shouldAllowAccessToNode(V8BindingState::Only(), imp->" . $attribute->signature->name . "()))\n return v8::Handle<v8::Value>(v8::Null(info.GetIsolate()));\n\n"); 846 846 } 847 847 … … 1005 1005 push(@implContentDecls, <<END); 1006 1006 SerializedScriptValue* serialized = imp->${getterFunc}(); 1007 value = serialized ? serialized->deserialize() : v8::Handle<v8::Value>(v8::Null( ));1007 value = serialized ? serialized->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())); 1008 1008 info.Holder()->SetHiddenValue(propertyName, value); 1009 1009 return value; … … 1438 1438 if ($function->signature->extendedAttributes->{"CheckSecurityForNode"}) { 1439 1439 push(@implContentDecls, " if (!V8BindingSecurity::shouldAllowAccessToNode(V8BindingState::Only(), imp->" . $function->signature->name . "(ec)))\n"); 1440 push(@implContentDecls, " return v8::Handle<v8::Value>(v8::Null( ));\n");1440 push(@implContentDecls, " return v8::Handle<v8::Value>(v8::Null(args.GetIsolate()));\n"); 1441 1441 END 1442 1442 } … … 3860 3860 if ($type eq "EventListener") { 3861 3861 AddToImplIncludes("V8AbstractEventListener.h"); 3862 return "${value} ? v8::Handle<v8::Value>(static_cast<V8AbstractEventListener*>(${value})->getListenerObject(imp->scriptExecutionContext())) : v8::Handle<v8::Value>(v8::Null( ))";3862 return "${value} ? v8::Handle<v8::Value>(static_cast<V8AbstractEventListener*>(${value})->getListenerObject(imp->scriptExecutionContext())) : v8::Handle<v8::Value>(v8::Null($getIsolate))"; 3863 3863 } 3864 3864 3865 3865 if ($type eq "SerializedScriptValue") { 3866 3866 AddToImplIncludes("$type.h"); 3867 return "$value ? $value->deserialize() : v8::Handle<v8::Value>(v8::Null( ))";3867 return "$value ? $value->deserialize() : v8::Handle<v8::Value>(v8::Null($getIsolate))"; 3868 3868 } 3869 3869 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
r118075 r118129 1135 1135 TestObj* imp = V8TestObj::toNative(info.Holder()); 1136 1136 if (!V8BindingSecurity::shouldAllowAccessToNode(V8BindingState::Only(), imp->contentDocument())) 1137 return v8::Handle<v8::Value>(v8::Null( ));1137 return v8::Handle<v8::Value>(v8::Null(info.GetIsolate())); 1138 1138 1139 1139 return toV8(imp->contentDocument(), info.GetIsolate()); … … 1905 1905 { 1906 1906 if (!V8BindingSecurity::shouldAllowAccessToNode(V8BindingState::Only(), imp->getSVGDocument(ec))) 1907 return v8::Handle<v8::Value>(v8::Null( ));1907 return v8::Handle<v8::Value>(v8::Null(args.GetIsolate())); 1908 1908 RefPtr<SVGDocument> result = imp->getSVGDocument(ec); 1909 1909 if (UNLIKELY(ec)) -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
r117925 r118129 51 51 INC_STATS("DOM.TestSerializedScriptValueInterface.value._get"); 52 52 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder()); 53 return imp->value() ? imp->value()->deserialize() : v8::Handle<v8::Value>(v8::Null( ));53 return imp->value() ? imp->value()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())); 54 54 } 55 55 … … 67 67 INC_STATS("DOM.TestSerializedScriptValueInterface.readonlyValue._get"); 68 68 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder()); 69 return imp->readonlyValue() ? imp->readonlyValue()->deserialize() : v8::Handle<v8::Value>(v8::Null( ));69 return imp->readonlyValue() ? imp->readonlyValue()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())); 70 70 } 71 71 … … 79 79 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder()); 80 80 SerializedScriptValue* serialized = imp->cachedValue(); 81 value = serialized ? serialized->deserialize() : v8::Handle<v8::Value>(v8::Null( ));81 value = serialized ? serialized->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())); 82 82 info.Holder()->SetHiddenValue(propertyName, value); 83 83 return value; … … 117 117 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder()); 118 118 SerializedScriptValue* serialized = imp->cachedReadonlyValue(); 119 value = serialized ? serialized->deserialize() : v8::Handle<v8::Value>(v8::Null( ));119 value = serialized ? serialized->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())); 120 120 info.Holder()->SetHiddenValue(propertyName, value); 121 121 return value;
Note: See TracChangeset
for help on using the changeset viewer.