Commit 904bab81 authored by fpizlo@apple.com's avatar fpizlo@apple.com

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.

Source/JavaScriptCore: 

Export a method that WebCore now uses.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/JSObject.h:
(JSObject):

Source/WebCore: 

New test: fast/js/post-message-numeric-property.html

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::putProperty):

LayoutTests: 

* 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):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 51bdc905
2012-09-24 Filip Pizlo <fpizlo@apple.com>
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 <yosin@chromium.org>
Document::adoptNode for multiple fields time input UI should not crash
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'
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="resources/js-test-pre.js"></script>
</head>
<body>
<script src="script-tests/post-message-numeric-property.js"></script>
<script src="resources/js-test-post.js"></script>
</body>
</html>
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"}, "*");
2012-09-24 Filip Pizlo <fpizlo@apple.com>
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.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/JSObject.h:
(JSObject):
2012-09-24 Gavin Barraclough <barraclough@apple.com>
Remove JSObject::unwrappedGlobalObject(), JSObject::unwrappedObject()
......
......@@ -277,6 +277,7 @@ EXPORTS
?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
......
......@@ -200,7 +200,7 @@ namespace JSC {
}
// 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)
{
......
2012-09-24 Filip Pizlo <fpizlo@apple.com>
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 <barraclough@apple.com>
Remove JSObject::unwrappedGlobalObject(), JSObject::unwrappedObject()
......@@ -1320,7 +1320,7 @@ private:
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment