• Benedikt Meurer's avatar
    [builtins] Widen the fast-path for Promise builtins. · db0556b7
    Benedikt Meurer authored
    This adds a new isolate wide Promise#then protector, which guards the
    "then" lookup for all JSPromise instances whose [[Prototype]] is the
    initial %PromisePrototype%. Thus arbitrary mutations to the
    Promise.prototype (i.e. monkey-patching other methods or installing
    new functions) no longer sent you down the slow-path. Use this protector
    in Promise.prototype.catch and in Promise.resolve.
    
    Drive-by-fix: Restructure the resolve logic a bit and avoid the
    expensive and large SameValue check, which can be turned into a simple
    reference equal, as the promise in there is known to be a JSPromise
    anyways.
    
    Bug: v8:7253
    Change-Id: If68b12c6bc6ca9c4d10552ae84854ebc3b5774f9
    Reviewed-on: https://chromium-review.googlesource.com/899302
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#51085}
    db0556b7
Name
Last commit
Last update
..
heap-tester.h Loading commit data...
heap-utils.cc Loading commit data...
heap-utils.h Loading commit data...
test-alloc.cc Loading commit data...
test-array-buffer-tracker.cc Loading commit data...
test-compaction.cc Loading commit data...
test-concurrent-marking.cc Loading commit data...
test-embedder-tracing.cc Loading commit data...
test-heap.cc Loading commit data...
test-incremental-marking.cc Loading commit data...
test-invalidated-slots.cc Loading commit data...
test-lab.cc Loading commit data...
test-mark-compact.cc Loading commit data...
test-page-promotion.cc Loading commit data...
test-spaces.cc Loading commit data...