WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
135305
CodeCache should not cache when the WebInspector is open
https://bugs.webkit.org/show_bug.cgi?id=135305
Summary
CodeCache should not cache when the WebInspector is open
Saam Barati
Reported
2014-07-25 14:41:23 PDT
The WebInspector often uses source code IDs to identify unique scripts. If CodeCache is turned on, it may determine two scripts are the same because their text contents are the same, when indeed the two scripts come from discreet websites, and when the cache returns a CodeBlock, it doesn't change it's originating source ID. This has an especially perverse effect when high fidelity type profiling is enabled because the type profiler uses source code IDs in JavaScriptCore to correlate the unique identity of scripts with the WebInspector. This also has another perverse effect that when type profiling is enabled then disabled: JavaScriptCore recompiles all scripts because type profiling is only enabled in the LLInt. If type profiling is enabled then disabled, and the CodeCache successfully caches a script that had this profiling enabled, but type profiling is currently disabled, it will try to tier up a CodeBlock to the baseline JIT that contains the opcodes for type profiling, and this tier up causes a runtime exception.
Attachments
Add attachment
proposed patch, testcase, etc.
Saam Barati
Comment 1
2014-07-25 18:43:40 PDT
(In reply to
comment #0
)
> The WebInspector often uses source code IDs to identify unique scripts. If CodeCache is turned on, it may determine two scripts are the same because their text contents are the same, when indeed the two scripts come from discreet websites, and when the cache returns a CodeBlock, it doesn't change it's originating source ID. This has an especially perverse effect when high fidelity type profiling is enabled because the type profiler uses source code IDs in JavaScriptCore to correlate the unique identity of scripts with the WebInspector. This also has another perverse effect that when type profiling is enabled then disabled: JavaScriptCore recompiles all scripts because type profiling is only enabled in the LLInt. If type profiling is enabled then disabled, and the CodeCache successfully caches a script that had this profiling enabled, but type profiling is currently disabled, it will try to tier up a CodeBlock to the baseline JIT that contains the opcodes for type profiling, and this tier up causes a runtime exception.
This is false. CodeCache does respect the files that the inspector is viewing. My problem is that I compiled code based on a global VM flag, but the CodeCache respects caching on a GlobalObject basis.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug