Chromium Code Reviews| 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 4b0d2ab7ee9ba11e9f8db1992ba794b45be4af94..099eaba7150bfa086b13b6adba587f333e6a68e4 100644 |
| --- a/Source/bindings/scripts/code_generator_v8.pm |
| +++ b/Source/bindings/scripts/code_generator_v8.pm |
| @@ -2933,7 +2933,8 @@ END |
| } |
| my $argumentString = join(", ", @beforeArgumentList, @argumentList, @afterArgumentList); |
| - $code .= " RefPtr<${implClassName}> impl = ${implClassName}::create(${argumentString});\n"; |
| + my $refPtrType = IsGarbageCollectedType($interfaceName) ? "RefPtrWillBeRawPtr<$implClassName>" : "RefPtr<$implClassName>"; |
|
haraken
2014/02/06 05:35:28
Probably we need to implement a good helper method
tkent
2014/02/06 05:44:52
This change looks like we need to introduce anothe
haraken
2014/02/06 06:17:46
Yeah, agreed. I'll rename [GarbageCollected] to [W
Nils Barth (inactive)
2014/02/07 00:59:24
That's already handled as part of v8_types.cpp_typ
|
| + $code .= " $refPtrType impl = ${implClassName}::create(${argumentString});\n"; |
| $code .= " v8::Handle<v8::Object> wrapper = info.Holder();\n"; |
| if ($constructorRaisesException) { |
| @@ -5160,7 +5161,7 @@ sub GenerateToV8Converters |
| return; |
| } |
| - my $createWrapperArgumentType = GetPassRefPtrType($interface); |
| + my $passRefPtrType = GetPassRefPtrType($interface); |
| # FIXME: Do we really need to treat /SVG/ as dependent DOM objects? |
| my $wrapperConfiguration = "WrapperConfiguration::Independent"; |
| @@ -5173,7 +5174,7 @@ sub GenerateToV8Converters |
| my $code = ""; |
| $code .= <<END; |
| -v8::Handle<v8::Object> ${v8ClassName}::createWrapper(${createWrapperArgumentType} impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| +v8::Handle<v8::Object> ${v8ClassName}::createWrapper(${passRefPtrType} impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| { |
| ASSERT(impl); |
| ASSERT(!DOMDataStore::containsWrapper<${v8ClassName}>(impl.get(), isolate)); |