Issue metadata
Sign in to add a comment
|
try/catch breaks subsequent typeof checks
Reported by
karoli...@gmail.com,
Aug 4 2016
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.34 Safari/537.36
Steps to reproduce the problem:
1. Evaluate the following code in console (or load script.js):
```
try {
module.exports = 'foo'
} catch (err) {}
if (typeof module === 'object' && module.exports) {
module.exports = 'bar'
}
console.log('here')
```
What is the expected behavior?
"here" is logged
What went wrong?
"VM45:4 Uncaught ReferenceError: module is not defined" is thrown.
Did this work before? Yes Chrome 52
Chrome version: 53.0.2785.34 Channel: beta
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 22.0 r0
This is not specific to module.exports, typeof check of any variable breaks the same way, e.g.:
```
try {
baz.bak = 'foo'
} catch (err) {}
if (typeof baz === 'object' && baz.bak) {
baz.bak = 'bar'
}
console.log('here')
```
Removing try/catch makes it work:
```
if (typeof baz === 'object' && baz.bak) {
baz.bak = 'bar'
}
console.log('here')
```
,
Aug 5 2016
,
Aug 5 2016
,
Aug 5 2016
Able to reproduce the issue on mac 10.11.5 chrome version dev 54.0.2816.0 and canary 54.0.2819.0 This is a regression in M53 and below is the info Manual Bisect Info: Good Build: 53.0.2778.0 Bad Build: 53.0.2779.0 Bisect Tool Info: You are probably looking for a change made after 401833 (known good), but no later than 401834 (first known bad). CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/26b402b376aabbb5873a9c129adf74b60d033fda..a795fd0248b18c3d82db74b93e3fd162b07ce05c Possible suspect : https://codereview.chromium.org/2088393003 Please reassign if the change is not related to yours The issue is seen in windows and Linux as well
,
Aug 5 2016
Adam's changes in the range look relevant. PTAL.
,
Aug 5 2016
I can't reproduce in d8, but I can in chrome and content_shell. I don't think it's my change, though, but rather ishell's https://codereview.chromium.org/2081143002: it touched global loads and typeof handling.
,
Aug 6 2016
The issue is that we merge load global IC slots for loads inside typeof and outside typeof. This becomes observable after my CL (https://codereview.chromium.org/2081143002) in case of interceptors when we install a slow stub that suits only one case.
,
Aug 8 2016
The fix in flight: https://codereview.chromium.org/2219303002/
,
Aug 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/d634e65fb07fb7c3a79680237c5e90a9fae6645c commit d634e65fb07fb7c3a79680237c5e90a9fae6645c Author: ishell <ishell@chromium.org> Date: Tue Aug 09 16:30:25 2016 [ic] Don't share LoadGlobalIC slots inside typeof and outside typeof. Because in case of interceptors we will install a slow stub that suits only one case. BUG= chromium:634467 TBR=verwaest@chromium.org Review-Url: https://codereview.chromium.org/2219303002 Cr-Commit-Position: refs/heads/master@{#38503} [modify] https://crrev.com/d634e65fb07fb7c3a79680237c5e90a9fae6645c/src/ast/ast-numbering.cc [modify] https://crrev.com/d634e65fb07fb7c3a79680237c5e90a9fae6645c/test/cctest/test-api-interceptors.cc
,
Aug 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/d634e65fb07fb7c3a79680237c5e90a9fae6645c commit d634e65fb07fb7c3a79680237c5e90a9fae6645c Author: ishell <ishell@chromium.org> Date: Tue Aug 09 16:30:25 2016 [ic] Don't share LoadGlobalIC slots inside typeof and outside typeof. Because in case of interceptors we will install a slow stub that suits only one case. BUG= chromium:634467 TBR=verwaest@chromium.org Review-Url: https://codereview.chromium.org/2219303002 Cr-Commit-Position: refs/heads/master@{#38503} [modify] https://crrev.com/d634e65fb07fb7c3a79680237c5e90a9fae6645c/src/ast/ast-numbering.cc [modify] https://crrev.com/d634e65fb07fb7c3a79680237c5e90a9fae6645c/test/cctest/test-api-interceptors.cc
,
Aug 9 2016
Seems like we probably want to merge this to M53?
,
Aug 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/b558894ac447108495f5740057e6f999619454fa commit b558894ac447108495f5740057e6f999619454fa Author: ishell <ishell@chromium.org> Date: Wed Aug 10 16:35:56 2016 [ic] Merge LoadGlobalIC_Slow builtins for inside typeof and outside typeof cases. ... and let the stub ask the IC whether it should throw or not when the property was not found. This CL undoes ast-numbering changes made here: https://codereview.chromium.org/2219303002/ BUG= chromium:634467 TBR=verwaest@chromium.org Review-Url: https://codereview.chromium.org/2220203002 Cr-Commit-Position: refs/heads/master@{#38549} [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/ast/ast-numbering.cc [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/builtins/builtins-handler.cc [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/builtins/builtins.h [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/ic/ic.cc [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/ic/ic.h [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/runtime/runtime-object.cc [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/runtime/runtime.h
,
Aug 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/b558894ac447108495f5740057e6f999619454fa commit b558894ac447108495f5740057e6f999619454fa Author: ishell <ishell@chromium.org> Date: Wed Aug 10 16:35:56 2016 [ic] Merge LoadGlobalIC_Slow builtins for inside typeof and outside typeof cases. ... and let the stub ask the IC whether it should throw or not when the property was not found. This CL undoes ast-numbering changes made here: https://codereview.chromium.org/2219303002/ BUG= chromium:634467 TBR=verwaest@chromium.org Review-Url: https://codereview.chromium.org/2220203002 Cr-Commit-Position: refs/heads/master@{#38549} [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/ast/ast-numbering.cc [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/builtins/builtins-handler.cc [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/builtins/builtins.h [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/ic/ic.cc [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/ic/ic.h [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/runtime/runtime-object.cc [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/runtime/runtime.h
,
Aug 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/b558894ac447108495f5740057e6f999619454fa commit b558894ac447108495f5740057e6f999619454fa Author: ishell <ishell@chromium.org> Date: Wed Aug 10 16:35:56 2016 [ic] Merge LoadGlobalIC_Slow builtins for inside typeof and outside typeof cases. ... and let the stub ask the IC whether it should throw or not when the property was not found. This CL undoes ast-numbering changes made here: https://codereview.chromium.org/2219303002/ BUG= chromium:634467 TBR=verwaest@chromium.org Review-Url: https://codereview.chromium.org/2220203002 Cr-Commit-Position: refs/heads/master@{#38549} [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/ast/ast-numbering.cc [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/builtins/builtins-handler.cc [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/builtins/builtins.h [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/ic/ic.cc [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/ic/ic.h [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/runtime/runtime-object.cc [modify] https://crrev.com/b558894ac447108495f5740057e6f999619454fa/src/runtime/runtime.h
,
Aug 10 2016
,
Aug 11 2016
Is this whole bug fixed too?
,
Aug 11 2016
Please merge your change to M53 branch 2785 latest by Friday 5:00 PM PT so we can take it in for next week Beta release. Thank you.
,
Aug 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/426f51890efa76d39a498ce61167225d04326d49 commit 426f51890efa76d39a498ce61167225d04326d49 Author: Jakob Kummerow <jkummerow@chromium.org> Date: Fri Aug 12 12:20:52 2016 Merged: Squashed multiple commits. Merged: [ic] Don't share LoadGlobalIC slots inside typeof and outside typeof. Revision: d634e65 Merged: [ic] Merge LoadGlobalIC_Slow builtins for inside typeof and outside typeof cases. Revision: b558894 BUG= chromium:634467 , chromium:634467 LOG=N NOTRY=true NOPRESUBMIT=true NOTREECHECKS=true R=verwaest@chromium.org Review URL: https://codereview.chromium.org/2237983004 . Cr-Commit-Position: refs/branch-heads/5.3@{#42} Cr-Branched-From: 820a23aade5e74a92d794e05a0c2b3597f0da4b5-refs/heads/5.3.332@{#2} Cr-Branched-From: 37538cb2c1b4d75c41af386cb4fedbe5566f5608-refs/heads/master@{#37308} [modify] https://crrev.com/426f51890efa76d39a498ce61167225d04326d49/src/builtins.cc [modify] https://crrev.com/426f51890efa76d39a498ce61167225d04326d49/src/builtins.h [modify] https://crrev.com/426f51890efa76d39a498ce61167225d04326d49/src/ic/ic.cc [modify] https://crrev.com/426f51890efa76d39a498ce61167225d04326d49/src/ic/ic.h [modify] https://crrev.com/426f51890efa76d39a498ce61167225d04326d49/src/runtime/runtime-object.cc [modify] https://crrev.com/426f51890efa76d39a498ce61167225d04326d49/src/runtime/runtime.h [modify] https://crrev.com/426f51890efa76d39a498ce61167225d04326d49/test/cctest/test-api-interceptors.cc
,
Aug 12 2016
Per comment #18, this is already merged to M53. So removing "Merge-Approved-53" label.
,
Aug 15 2016
M53 Stable launch is coming VERY soon.Your bug is labelled as Stable ReleaseBlock, pls make sure to land the fix asap so it gets chance to bake in beta before stable promotion later this month. Thank you.
,
Aug 15 2016
,
Aug 16 2016
,
Aug 22 2016
Verified the fix on Windows 7, MAC (10.11.6) & Ubuntu Trusty (14.04) for Google Chrome Version - 54.0.2835.0 Screen-recording is attached. TE-Verified labels are added. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by tkent@chromium.org
, Aug 4 2016Labels: Needs-Bisect