Title: [201419] trunk/Source/WebCore
Revision
201419
Author
[email protected]
Date
2016-05-26 09:10:33 -0700 (Thu, 26 May 2016)

Log Message

NativeToJSValue is harcoding the $thisValue in some strings
https://bugs.webkit.org/show_bug.cgi?id=158113

Patch by Alejandro G. Castro <[email protected]> on 2016-05-26
Reviewed by Darin Adler.

Replaced the string with the variable value.

Updated the tests results in the bindings.

* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Replaced the hardcoded string with the variable
value.
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
* bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
(WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (201418 => 201419)


--- trunk/Source/WebCore/ChangeLog	2016-05-26 09:14:20 UTC (rev 201418)
+++ trunk/Source/WebCore/ChangeLog	2016-05-26 16:10:33 UTC (rev 201419)
@@ -1,3 +1,22 @@
+2016-05-26  Alejandro G. Castro  <[email protected]>
+
+        NativeToJSValue is harcoding the $thisValue in some strings
+        https://bugs.webkit.org/show_bug.cgi?id=158113
+
+        Reviewed by Darin Adler.
+
+        Replaced the string with the variable value.
+
+        Updated the tests results in the bindings.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (NativeToJSValue): Replaced the hardcoded string with the variable
+        value.
+        * bindings/scripts/test/JS/JSTestCallback.cpp:
+        (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
+        * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
+        (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
+
 2016-05-26  Frederic Wang  <[email protected]>
 
         Small improvements to RenderBox/LayoutUnit casting in MathML

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (201418 => 201419)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-05-26 09:14:20 UTC (rev 201418)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-05-26 16:10:33 UTC (rev 201419)
@@ -4486,7 +4486,7 @@
 
     if ($type eq "SerializedScriptValue") {
         AddToImplIncludes("SerializedScriptValue.h", $conditional);
-        return "$value ? $value->deserialize(state, castedThis->globalObject(), 0) : jsNull()";
+        return "$value ? $value->deserialize(state, $thisValue->globalObject(), 0) : jsNull()";
     }
 
     AddToImplIncludes("StyleProperties.h", $conditional) if $type eq "CSSStyleDeclaration";
@@ -4514,7 +4514,7 @@
             if ($selfIsTearOffType) {
                 # FIXME: Why SVGMatrix specifically?
                 AddToImplIncludes("SVGMatrixTearOff.h", $conditional);
-                $value = "SVGMatrixTearOff::create(castedThis->wrapped(), $value)";
+                $value = "SVGMatrixTearOff::create($thisValue->wrapped(), $value)";
             } else {
                 AddToImplIncludes("SVGStaticPropertyTearOff.h", $conditional);
                 my $interfaceName = $interface->name;

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp (201418 => 201419)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp	2016-05-26 09:14:20 UTC (rev 201418)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp	2016-05-26 16:10:33 UTC (rev 201419)
@@ -146,7 +146,7 @@
 
     ExecState* state = m_data->globalObject()->globalExec();
     MarkedArgumentBuffer args;
-    args.append(srzParam ? srzParam->deserialize(state, castedThis->globalObject(), 0) : jsNull());
+    args.append(srzParam ? srzParam->deserialize(state, m_data->globalObject(), 0) : jsNull());
     args.append(jsStringWithCache(state, strArg));
 
     NakedPtr<Exception> returnedException;

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp (201418 => 201419)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp	2016-05-26 09:14:20 UTC (rev 201418)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp	2016-05-26 16:10:33 UTC (rev 201419)
@@ -112,7 +112,7 @@
 
     ExecState* state = m_data->globalObject()->globalExec();
     MarkedArgumentBuffer args;
-    args.append(srzParam ? srzParam->deserialize(state, castedThis->globalObject(), 0) : jsNull());
+    args.append(srzParam ? srzParam->deserialize(state, m_data->globalObject(), 0) : jsNull());
     args.append(jsStringWithCache(state, strArg));
 
     NakedPtr<Exception> returnedException;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to