[webkit-reviews] review denied: [Bug 88283] JSC:need to implement Dictionary::getWithUndefinedOrNullCheck for IDB : [Attachment 145718] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 5 01:23:38 PDT 2012


Kentaro Hara <haraken at chromium.org> has denied Charles Wei
<charles.wei at torchmobile.com.cn>'s request for review:
Bug 88283: JSC:need to implement Dictionary::getWithUndefinedOrNullCheck for
IDB
https://bugs.webkit.org/show_bug.cgi?id=88283

Attachment 145718: Patch
https://bugs.webkit.org/attachment.cgi?id=145718&action=review

------- Additional Comments from Kentaro Hara <haraken at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=145718&action=review


> Source/WebCore/ChangeLog:9
> +	   No new tests, this patch is to make idb work for JSC. All the
existing
> +	   test cases for idb should apply.

What are the existing test cases? IDB is already enabled on JSC?

> Source/WebCore/bindings/js/Dictionary.cpp:91
> +    JSObject* object = m_dictionary.initializerObject();
> +    ExecState* exec = m_dictionary.execState();
> +    Identifier identifier(exec, propertyName.impl());
> +    JSValue jsValue = object->get(exec, identifier);
>  

More reasonable approach would be

(1) Dictionary::getWithUndefinedOrNullCheck() just calls
JSDictionary::getWithUndefinedOrNullCheck(), which you need to newly implement
as follows.
(2) JSDictionary::getWithUndefinedOrNullCheck() calls
JSDictionary::tryGetPropertyAndResult(..., true), where the last argument
indicates to check undefined or null.
(3) Modify JSDictionary::tryGetPropertyAndResult(..., bool) to support the last
bool argument. If it is true, check undefined or null.


More information about the webkit-reviews mailing list