Diff
Modified: trunk/LayoutTests/ChangeLog (129456 => 129457)
--- trunk/LayoutTests/ChangeLog 2012-09-25 04:52:26 UTC (rev 129456)
+++ trunk/LayoutTests/ChangeLog 2012-09-25 05:27:33 UTC (rev 129457)
@@ -1,3 +1,16 @@
+2012-09-24 Filip Pizlo <[email protected]>
+
+ SerializedScriptValue isn't aware of indexed storage, but should be
+ https://bugs.webkit.org/show_bug.cgi?id=97515
+ <rdar://problem/12361874>
+
+ Reviewed by Sam Weinig.
+
+ * fast/js/post-message-numeric-property-expected.txt: Added.
+ * fast/js/post-message-numeric-property.html: Added.
+ * fast/js/script-tests/post-message-numeric-property.js: Added.
+ (window.onmessage):
+
2012-09-24 Yoshifumi Inoue <[email protected]>
Document::adoptNode for multiple fields time input UI should not crash
Added: trunk/LayoutTests/fast/js/post-message-numeric-property-expected.txt (0 => 129457)
--- trunk/LayoutTests/fast/js/post-message-numeric-property-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/js/post-message-numeric-property-expected.txt 2012-09-25 05:27:33 UTC (rev 129457)
@@ -0,0 +1,10 @@
+Tests that posting a message that consists of an object with a numeric property doesn't try to reify the property as a named property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS e.data[0] is 'hi'
+
Added: trunk/LayoutTests/fast/js/post-message-numeric-property.html (0 => 129457)
--- trunk/LayoutTests/fast/js/post-message-numeric-property.html (rev 0)
+++ trunk/LayoutTests/fast/js/post-message-numeric-property.html 2012-09-25 05:27:33 UTC (rev 129457)
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script src=""
+<script src=""
+</body>
+</html>
Added: trunk/LayoutTests/fast/js/script-tests/post-message-numeric-property.js (0 => 129457)
--- trunk/LayoutTests/fast/js/script-tests/post-message-numeric-property.js (rev 0)
+++ trunk/LayoutTests/fast/js/script-tests/post-message-numeric-property.js 2012-09-25 05:27:33 UTC (rev 129457)
@@ -0,0 +1,18 @@
+description(
+"Tests that posting a message that consists of an object with a numeric property doesn't try to reify the property as a named property."
+);
+
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+window._onmessage_ = function(e) {
+ var foo = e.data;
+ if (foo[0] == "hi")
+ testPassed("e.data[0] is 'hi'");
+ else
+ testFailed("e.data[0] is not 'hi'");
+ if (testRunner)
+ testRunner.notifyDone();
+}
+
+window.postMessage({0:"hi"}, "*");
Modified: trunk/Source/_javascript_Core/ChangeLog (129456 => 129457)
--- trunk/Source/_javascript_Core/ChangeLog 2012-09-25 04:52:26 UTC (rev 129456)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-09-25 05:27:33 UTC (rev 129457)
@@ -1,3 +1,17 @@
+2012-09-24 Filip Pizlo <[email protected]>
+
+ SerializedScriptValue isn't aware of indexed storage, but should be
+ https://bugs.webkit.org/show_bug.cgi?id=97515
+ <rdar://problem/12361874>
+
+ Reviewed by Sam Weinig.
+
+ Export a method that WebCore now uses.
+
+ * _javascript_Core.vcproj/_javascript_Core/_javascript_Core.def:
+ * runtime/JSObject.h:
+ (JSObject):
+
2012-09-24 Gavin Barraclough <[email protected]>
Remove JSObject::unwrappedGlobalObject(), JSObject::unwrappedObject()
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def (129456 => 129457)
--- trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def 2012-09-25 04:52:26 UTC (rev 129456)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def 2012-09-25 05:27:33 UTC (rev 129457)
@@ -277,6 +277,7 @@
?put@JSObject@JSC@@SAXPAVJSCell@2@PAVExecState@2@VPropertyName@2@VJSValue@2@AAVPutPropertySlot@2@@Z
?putByIndex@JSObject@JSC@@SAXPAVJSCell@2@PAVExecState@2@IVJSValue@2@_N@Z
?putDirectIndexBeyondVectorLength@JSObject@JSC@@AAE_NPAVExecState@2@IVJSValue@2@IW4PutDirectIndexMode@2@@Z
+ ?putDirectMayBeIndex@JSObject@JSC@@QAEXPAVExecState@2@VPropertyName@2@VJSValue@2@@Z
?putDirectVirtual@JSGlobalObject@JSC@@SAXPAVJSObject@2@PAVExecState@2@VPropertyName@2@VJSValue@2@I@Z
?putDirectVirtual@JSObject@JSC@@SAXPAV12@PAVExecState@2@VPropertyName@2@VJSValue@2@I@Z
?randomNumber@WTF@@YANXZ
Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (129456 => 129457)
--- trunk/Source/_javascript_Core/runtime/JSObject.h 2012-09-25 04:52:26 UTC (rev 129456)
+++ trunk/Source/_javascript_Core/runtime/JSObject.h 2012-09-25 05:27:33 UTC (rev 129457)
@@ -200,7 +200,7 @@
}
// A non-throwing version of putDirect and putDirectIndex.
- void putDirectMayBeIndex(ExecState*, PropertyName, JSValue);
+ JS_EXPORT_PRIVATE void putDirectMayBeIndex(ExecState*, PropertyName, JSValue);
bool canGetIndexQuickly(unsigned i)
{
Modified: trunk/Source/WebCore/ChangeLog (129456 => 129457)
--- trunk/Source/WebCore/ChangeLog 2012-09-25 04:52:26 UTC (rev 129456)
+++ trunk/Source/WebCore/ChangeLog 2012-09-25 05:27:33 UTC (rev 129457)
@@ -1,3 +1,16 @@
+2012-09-24 Filip Pizlo <[email protected]>
+
+ SerializedScriptValue isn't aware of indexed storage, but should be
+ https://bugs.webkit.org/show_bug.cgi?id=97515
+ <rdar://problem/12361874>
+
+ Reviewed by Sam Weinig.
+
+ New test: fast/js/post-message-numeric-property.html
+
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::CloneDeserializer::putProperty):
+
2012-09-24 Gavin Barraclough <[email protected]>
Remove JSObject::unwrappedGlobalObject(), JSObject::unwrappedObject()
Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp (129456 => 129457)
--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp 2012-09-25 04:52:26 UTC (rev 129456)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp 2012-09-25 05:27:33 UTC (rev 129457)
@@ -1320,7 +1320,7 @@
void putProperty(JSObject* object, const Identifier& property, JSValue value)
{
- object->putDirect(m_exec->globalData(), property, value);
+ object->putDirectMayBeIndex(m_exec, property, value);
}
bool readFile(RefPtr<File>& file)