Bug 147874 - [ES6] Implement Reflect.getPrototypeOf and Reflect.setPrototypeOf
Summary: [ES6] Implement Reflect.getPrototypeOf and Reflect.setPrototypeOf
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-11 01:50 PDT by Yusuke Suzuki
Modified: 2015-08-11 10:57 PDT (History)
6 users (show)

See Also:


Attachments
Patch (12.30 KB, patch)
2015-08-11 01:52 PDT, Yusuke Suzuki
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2015-08-11 01:50:19 PDT
[ES6] Implement Reflect.getPrototypeOf and Reflect.setPrototypeOf
Comment 1 Yusuke Suzuki 2015-08-11 01:52:30 PDT
Created attachment 258711 [details]
Patch
Comment 2 Darin Adler 2015-08-11 10:37:59 PDT
Comment on attachment 258711 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=258711&action=review

> Source/JavaScriptCore/runtime/ObjectConstructor.cpp:190
>          return JSValue::encode(jsNull());

Strange that this uses jsNull where most call sites use jsUndefined, yet this value is always ignored. Untidy to have this be different across the code base.
Comment 3 Yusuke Suzuki 2015-08-11 10:51:33 PDT
Comment on attachment 258711 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=258711&action=review

Thank you :)

>> Source/JavaScriptCore/runtime/ObjectConstructor.cpp:190
>>          return JSValue::encode(jsNull());
> 
> Strange that this uses jsNull where most call sites use jsUndefined, yet this value is always ignored. Untidy to have this be different across the code base.

Seeing the ObjectConstructor.cpp, in this file, using "jsNull()" as the non meaningful return value for the exception is major.
So I'll fix the touched part in this patch: `objectConstructorGetPrototypeOf` one.
When modifying / fixing the other part, at that time, we need to fix it gradually.
Comment 4 Yusuke Suzuki 2015-08-11 10:57:30 PDT
Committed r188262: <http://trac.webkit.org/changeset/188262>