Changeset 140624 in webkit
- Timestamp:
- Jan 23, 2013 6:11:18 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140622 r140624 1 2013-01-23 Kentaro Hara <haraken@chromium.org> 2 3 [V8] Make an Isolate parameter mandatory in NativeToJS() 4 https://bugs.webkit.org/show_bug.cgi?id=107663 5 6 Reviewed by Adam Barth. 7 8 No tests. No change in behavior. 9 10 * bindings/scripts/CodeGeneratorV8.pm: 11 (GenerateCallbackImplementation): 12 (NativeToJSValue): 13 * bindings/scripts/test/V8/V8TestCallback.cpp: 14 (WebCore::V8TestCallback::callbackWithClass1Param): 15 (WebCore::V8TestCallback::callbackWithClass2Param): 16 (WebCore::V8TestCallback::callbackWithStringList): 17 (WebCore::V8TestCallback::callbackWithBoolean): 18 (WebCore::V8TestCallback::callbackRequiresThisToPass): 19 1 20 2013-01-23 Benjamin Poulain <bpoulain@apple.com> 2 21 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r140616 r140624 3386 3386 foreach my $param (@params) { 3387 3387 my $paramName = $param->name; 3388 push(@implContent, " v8::Handle<v8::Value> ${paramName}Handle = " . NativeToJSValue($param, $paramName, "v8::Handle<v8::Object>()", "v8 ::Isolate::GetCurrent()") . ";\n");3388 push(@implContent, " v8::Handle<v8::Value> ${paramName}Handle = " . NativeToJSValue($param, $paramName, "v8::Handle<v8::Object>()", "v8Context->GetIsolate()") . ";\n"); 3389 3389 push(@implContent, " if (${paramName}Handle.IsEmpty()) {\n"); 3390 3390 push(@implContent, " if (!isScriptControllerTerminating())\n"); … … 4018 4018 my $getCreationContext = shift; 4019 4019 my $getIsolate = shift; 4020 die "An Isolate is mandatory for native value => JS value conversion." unless $getIsolate; 4020 4021 my $getHolderContainer = shift; 4021 4022 my $getHolderContainerArg = $getHolderContainer ? ", $getHolderContainer" : ""; … … 4027 4028 my $type = $signature->type; 4028 4029 4029 return ($getIsolate ? "v8Boolean($value, $getIsolate)" : "v8Boolean($value)")if $type eq "boolean";4030 return "v8Boolean($value, $getIsolate)" if $type eq "boolean"; 4030 4031 return "v8Undefined()" if $type eq "void"; # equivalent to v8Undefined() 4031 4032 … … 4058 4059 die "Unknown value for TreatReturnedNullStringAs extended attribute"; 4059 4060 } 4060 return $getIsolate ? "v8String($value, $getIsolate$returnHandleTypeArg)" : "deprecatedV8String($value)";4061 return "v8String($value, $getIsolate$returnHandleTypeArg)"; 4061 4062 } 4062 4063 … … 4088 4089 if ($type eq "EventListener") { 4089 4090 AddToImplIncludes("V8AbstractEventListener.h"); 4090 return "${value} ? v8::Handle<v8::Value>(static_cast<V8AbstractEventListener*>(${value})->getListenerObject(imp->scriptExecutionContext())) : v8::Handle<v8::Value>( " . ($getIsolate ? "v8Null($getIsolate)" : "v8::Null()") . ")";4091 return "${value} ? v8::Handle<v8::Value>(static_cast<V8AbstractEventListener*>(${value})->getListenerObject(imp->scriptExecutionContext())) : v8::Handle<v8::Value>(v8Null($getIsolate))"; 4091 4092 } 4092 4093 4093 4094 if ($type eq "SerializedScriptValue") { 4094 4095 AddToImplIncludes("$type.h"); 4095 return "$value ? $value->deserialize() : v8::Handle<v8::Value>( " . ($getIsolate ? "v8Null($getIsolate)" : "v8::Null()") . ")";4096 return "$value ? $value->deserialize() : v8::Handle<v8::Value>(v8Null($getIsolate))"; 4096 4097 } 4097 4098 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp
r139599 r140624 86 86 v8::Context::Scope scope(v8Context); 87 87 88 v8::Handle<v8::Value> class1ParamHandle = toV8(class1Param, v8::Handle<v8::Object>(), v8 ::Isolate::GetCurrent());88 v8::Handle<v8::Value> class1ParamHandle = toV8(class1Param, v8::Handle<v8::Object>(), v8Context->GetIsolate()); 89 89 if (class1ParamHandle.IsEmpty()) { 90 90 if (!isScriptControllerTerminating()) … … 114 114 v8::Context::Scope scope(v8Context); 115 115 116 v8::Handle<v8::Value> class2ParamHandle = toV8(class2Param, v8::Handle<v8::Object>(), v8 ::Isolate::GetCurrent());116 v8::Handle<v8::Value> class2ParamHandle = toV8(class2Param, v8::Handle<v8::Object>(), v8Context->GetIsolate()); 117 117 if (class2ParamHandle.IsEmpty()) { 118 118 if (!isScriptControllerTerminating()) … … 120 120 return true; 121 121 } 122 v8::Handle<v8::Value> strArgHandle = v8String(strArg, v8 ::Isolate::GetCurrent());122 v8::Handle<v8::Value> strArgHandle = v8String(strArg, v8Context->GetIsolate()); 123 123 if (strArgHandle.IsEmpty()) { 124 124 if (!isScriptControllerTerminating()) … … 149 149 v8::Context::Scope scope(v8Context); 150 150 151 v8::Handle<v8::Value> listParamHandle = toV8(listParam, v8::Handle<v8::Object>(), v8 ::Isolate::GetCurrent());151 v8::Handle<v8::Value> listParamHandle = toV8(listParam, v8::Handle<v8::Object>(), v8Context->GetIsolate()); 152 152 if (listParamHandle.IsEmpty()) { 153 153 if (!isScriptControllerTerminating()) … … 177 177 v8::Context::Scope scope(v8Context); 178 178 179 v8::Handle<v8::Value> boolParamHandle = v8Boolean(boolParam, v8 ::Isolate::GetCurrent());179 v8::Handle<v8::Value> boolParamHandle = v8Boolean(boolParam, v8Context->GetIsolate()); 180 180 if (boolParamHandle.IsEmpty()) { 181 181 if (!isScriptControllerTerminating()) … … 207 207 v8::Context::Scope scope(v8Context); 208 208 209 v8::Handle<v8::Value> class8ParamHandle = toV8(class8Param, v8::Handle<v8::Object>(), v8 ::Isolate::GetCurrent());209 v8::Handle<v8::Value> class8ParamHandle = toV8(class8Param, v8::Handle<v8::Object>(), v8Context->GetIsolate()); 210 210 if (class8ParamHandle.IsEmpty()) { 211 211 if (!isScriptControllerTerminating()) … … 213 213 return true; 214 214 } 215 v8::Handle<v8::Value> thisClassParamHandle = toV8(thisClassParam, v8::Handle<v8::Object>(), v8 ::Isolate::GetCurrent());215 v8::Handle<v8::Value> thisClassParamHandle = toV8(thisClassParam, v8::Handle<v8::Object>(), v8Context->GetIsolate()); 216 216 if (thisClassParamHandle.IsEmpty()) { 217 217 if (!isScriptControllerTerminating())
Note: See TracChangeset
for help on using the changeset viewer.