Title: [184162] releases/WebKitGTK/webkit-2.8/Source/WebCore
- Revision
- 184162
- Author
- [email protected]
- Date
- 2015-05-12 00:40:58 -0700 (Tue, 12 May 2015)
Log Message
Merge r183648 - DOM bindings should not be using a reference type to point to a temporary object
https://bugs.webkit.org/show_bug.cgi?id=144474
Reviewed by Beth Dakin.
The DOM bindings will currently try and use a local reference to point
to a temporary object. This currently works as a by product of the compiler's
stack layout. This patch removes the dependency on undefined behaviour
by ensuring that we use a value rather than reference type.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
(GetNativeTypeForCallbacks):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (184161 => 184162)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog 2015-05-12 07:35:27 UTC (rev 184161)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog 2015-05-12 07:40:58 UTC (rev 184162)
@@ -1,3 +1,19 @@
+2015-04-30 Oliver Hunt <[email protected]>
+
+ DOM bindings should not be using a reference type to point to a temporary object
+ https://bugs.webkit.org/show_bug.cgi?id=144474
+
+ Reviewed by Beth Dakin.
+
+ The DOM bindings will currently try and use a local reference to point
+ to a temporary object. This currently works as a by product of the compiler's
+ stack layout. This patch removes the dependency on undefined behaviour
+ by ensuring that we use a value rather than reference type.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateParametersCheck):
+ (GetNativeTypeForCallbacks):
+
2015-04-30 Brady Eidson <[email protected]>
Build fix after r183646 for less enlightened platforms.
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (184161 => 184162)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2015-05-12 07:35:27 UTC (rev 184161)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2015-05-12 07:40:58 UTC (rev 184162)
@@ -3319,7 +3319,7 @@
push(@$outputArray, " AtomicStringImpl* existing_$name = exec->argument($argsIndex).isEmpty() ? nullptr : exec->argument($argsIndex).toString(exec)->toExistingAtomicString(exec);\n");
push(@$outputArray, " if (!existing_$name)\n");
push(@$outputArray, " return JSValue::encode(jsNull());\n");
- push(@$outputArray, " const AtomicString& $name(existing_$name);\n");
+ push(@$outputArray, " const AtomicString $name(existing_$name);\n");
} else {
push(@$outputArray, " " . GetNativeTypeFromSignature($parameter) . " $name(" . JSValueToNative($parameter, $optional && $defaultAttribute && $defaultAttribute eq "NullString" ? "argumentOrNull(exec, $argsIndex)" : "exec->argument($argsIndex)") . ");\n");
}
@@ -3660,7 +3660,7 @@
my %nativeType = (
"CompareHow" => "Range::CompareHow",
- "DOMString" => "const String&",
+ "DOMString" => "const String",
"NodeFilter" => "RefPtr<NodeFilter>",
"SerializedScriptValue" => "RefPtr<SerializedScriptValue>",
"Date" => "double",
@@ -3720,6 +3720,7 @@
my $type = shift;
return "PassRefPtr<SerializedScriptValue>" if $type eq "SerializedScriptValue";
return "PassRefPtr<DOMStringList>" if $type eq "DOMStringList";
+ return "const String&" if $type eq "DOMString";
return GetNativeType($type);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes