Bug 147874

Summary: [ES6] Implement Reflect.getPrototypeOf and Reflect.setPrototypeOf
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, fpizlo, ggaren, mark.lam, saam, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

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>