• adamk@chromium.org's avatar
    Ensure that JSProxy::Fix gives the generated JSObject map a constructor · 71fbe7d4
    adamk@chromium.org authored
    All JSObjects in V8 either have a map()->constructor() field or are
    JSFunctions. JSProxy::Fix, however, was not enforcing this, and
    Object.observe's use of JSObject::GetCreationContext() exposed this.
    
    Note that this is not Object.observe-specific: the API call
    v8::Object::CreationContext() also would have revealed this bug.
    
    This patch chooses Object as a reasonable constructor to put on the
    newly-fixed object's map. Note that this has no effect on the "constructor"
    property in JS. In doing so, I've also tightened up the code underlying
    JSProxy::Fix to only support JSObject and JSFunction as possible output
    types.
    
    BUG=405844
    LOG=N
    R=rossberg@chromium.org, verwaest@chromium.org
    
    Review URL: https://codereview.chromium.org/505303004
    
    git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    71fbe7d4
Name
Last commit
Last update
..
regress Loading commit data...
array-fill.js Loading commit data...
array-find.js Loading commit data...
array-findindex.js Loading commit data...
array-of.js Loading commit data...
arrow-functions.js Loading commit data...
block-conflicts.js Loading commit data...
block-const-assign.js Loading commit data...
block-early-errors.js Loading commit data...
block-for.js Loading commit data...
block-lazy-compile.js Loading commit data...
block-leave.js Loading commit data...
block-let-crankshaft.js Loading commit data...
block-let-declaration.js Loading commit data...
block-let-semantics.js Loading commit data...
block-scoping.js Loading commit data...
dataview-accessors.js Loading commit data...
debug-blockscopes.js Loading commit data...
debug-evaluate-blockscopes.js Loading commit data...
debug-function-scopes.js Loading commit data...
empty-for.js Loading commit data...
module-linking.js Loading commit data...
module-parsing.js Loading commit data...
module-recompile.js Loading commit data...
module-resolution.js Loading commit data...
numeric-literals-off.js Loading commit data...
numeric-literals.js Loading commit data...
private.js Loading commit data...
proxies-example-membrane.js Loading commit data...
proxies-for.js Loading commit data...
proxies-function.js Loading commit data...
proxies-hash.js Loading commit data...
proxies-json.js Loading commit data...
proxies-symbols.js Loading commit data...
proxies-with-unscopables.js Loading commit data...
proxies-with.js Loading commit data...
proxies.js Loading commit data...
set-prototype-of.js Loading commit data...
string-codepointat.js Loading commit data...
string-contains.js Loading commit data...
string-endswith.js Loading commit data...
string-fromcodepoint.js Loading commit data...
string-repeat.js Loading commit data...
string-startswith.js Loading commit data...
toMethod.js Loading commit data...
typedarrays.js Loading commit data...