| Index: Source/bindings/scripts/code_generator_v8.pm
|
| diff --git a/Source/bindings/scripts/code_generator_v8.pm b/Source/bindings/scripts/code_generator_v8.pm
|
| index 03a1bdafd71d7da28a9448091c9a2ac7ac3a3102..9eba7868b01b48f20f66ff62556ec204c65ef93c 100644
|
| --- a/Source/bindings/scripts/code_generator_v8.pm
|
| +++ b/Source/bindings/scripts/code_generator_v8.pm
|
| @@ -764,6 +764,7 @@ END
|
| {
|
| return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
|
| }
|
| + static ${nativeType}* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>);
|
| static const WrapperTypeInfo wrapperTypeInfo;
|
| END
|
|
|
| @@ -4769,6 +4770,11 @@ bool ${v8ClassName}::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* iso
|
| || V8PerIsolateData::from(isolate)->hasInstanceInNonMainWorld(&wrapperTypeInfo, jsValue);
|
| }
|
|
|
| +${nativeType}* ${v8ClassName}::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
|
| +{
|
| + return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Object>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0;
|
| +}
|
| +
|
| END
|
|
|
| if (@perContextEnabledAttributes) {
|
| @@ -5637,7 +5643,7 @@ sub JSValueToNative
|
| AddIncludesForType($type);
|
|
|
| AddToImplIncludes("V8${type}.h");
|
| - return "V8${type}::hasInstance($value, $getIsolate) ? V8${type}::toNative(v8::Handle<v8::Object>::Cast($value)) : 0";
|
| + return "V8${type}::toNativeWithTypeCheck(info.GetIsolate(), $value)";
|
| }
|
|
|
| sub IsUnionType
|
|
|