Remove ScriptValue::GetContext()
You should be careful not to use a wrong context, which leads to a leak of information. Currently, we can get a context from scattered ScriptValue without consideration, but we would like to prevent it. Instead of from ScriptValue, you can get a context via - ScriptState::GetContext() using ScriptState passed from binding code - ScriptState::GetContext() using ScriptState stored on a C++ object - Isolate::GetCurrentContext() Also, we add GetScriptState() in InternalResolver to get a script_state from instead of from ScriptValue. It is safe because InternalResolver is only used internally. Bug: 998994 Change-Id: Iaa5a936635279566abe4801d4f15774eb628e83e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772793Reviewed-by:Yuki Shiino <yukishiino@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Reviewed-by:
Kouhei Ueno <kouhei@chromium.org> Reviewed-by:
Yutaka Hirano <yhirano@chromium.org> Reviewed-by:
Keishi Hattori <keishi@chromium.org> Reviewed-by:
Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Rika Fujimaki <rikaf@google.com> Cr-Commit-Position: refs/heads/master@{#692001}
Showing
Please register or sign in to comment