mirror of https://github.com/lukechilds/node.git
Browse Source
This commit backports a fix to a JIT bug in V8. After 100 or so comparisons `typeof null ==="undefined"` is returning `true` instead of `false`. Original commit message: Fix 'typeof null' canonicalization in crankshaft BUG= Review URL: https://codereview.chromium.org/1912553002 Cr-Commit-Position: refs/heads/master@{#35699} Ref: https://bugs.chromium.org/p/chromium/issues/detail?id=604033 PR-URL: https://github.com/nodejs/node/pull/7348 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>v6.x
committed by
Myles Borins
2 changed files with 13 additions and 1 deletions
@ -0,0 +1,12 @@ |
|||
// Copyright 2016 the V8 project authors. All rights reserved.
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
|||
// found in the LICENSE file.
|
|||
|
|||
// Flags: --allow-natives-syntax
|
|||
|
|||
function f() { |
|||
return typeof null === "object"; |
|||
}; |
|||
|
|||
%OptimizeFunctionOnNextCall(f); |
|||
assertTrue(f()); |
Loading…
Reference in new issue