WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 26591
Support revivers in JSON.parse
https://bugs.webkit.org/show_bug.cgi?id=26591
Summary
Support revivers in JSON.parse
Oliver Hunt
Reported
2009-06-21 16:10:03 PDT
As in title
Attachments
JSON.parse with reviver support
(14.45 KB, patch)
2009-06-22 18:11 PDT
,
Oliver Hunt
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Oliver Hunt
Comment 1
2009-06-22 18:11:25 PDT
Created
attachment 31698
[details]
JSON.parse with reviver support
Darin Adler
Comment 2
2009-06-22 18:18:09 PDT
Comment on
attachment 31698
[details]
JSON.parse with reviver support
> + (JSC::):
Please remove this garbage line inserted by the script.
> + JSValue callReviver(JSValue unfiltered, JSValue property) {
Please move this brace onto a separate line.
> + JSValue args[] = {property, unfiltered};
Could you add spaces inside the braces please? I'm worried that the arguments here are in the opposite order from the actual JavaScript function.
> + array->setIndex(indexStack.last(), callReviver(outValue, jsString(m_exec, UString::from(indexStack.last()))));
Gosh that UString::from is going to be slow!
> + Walker texasRanger(exec, asObject(function), callType, callData); > + return texasRanger.walk(unfiltered);
You can just put this on one line and so you won't have to apologize to our friends from Texas. You forgot to include the expected results. r=me if you fix these things
Oliver Hunt
Comment 3
2009-06-22 18:28:21 PDT
Committing to
http://svn.webkit.org/repository/webkit/trunk
... M JavaScriptCore/ChangeLog M JavaScriptCore/runtime/JSONObject.cpp M LayoutTests/ChangeLog M LayoutTests/fast/js/JSON-parse-expected.txt M LayoutTests/fast/js/resources/JSON-parse.js Committed
r44968
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug