Reviewers: Toon Verwaest,
Message:
PTAL
Description:
Follow-up for "Enable loads and stores to global vars through property cell
shortcuts installed into parent script context."
Please review this at https://codereview.chromium.org/1236523004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+7, -3 lines):
M src/runtime/runtime-object.cc
M test/cctest/test-serialize.cc
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index
8a3d0a1febdebe758c1c02b6f163837d82894746..a51e044b24b16c5f282d08524a6fac5d321dfc07
100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -432,7 +432,7 @@ RUNTIME_FUNCTION(Runtime_LoadGlobalViaContext) {
Handle<GlobalObject> global(script_context->global_object());
- LookupIterator it(global, name, LookupIterator::OWN);
+ LookupIterator it(global, name, LookupIterator::HIDDEN);
if (LookupIterator::DATA == it.state()) {
// Now update cell in the script context.
Handle<PropertyCell> cell = it.GetPropertyCell();
@@ -464,7 +464,7 @@ RUNTIME_FUNCTION(Runtime_StoreGlobalViaContext) {
Handle<GlobalObject> global(script_context->global_object());
- LookupIterator it(global, name, LookupIterator::OWN);
+ LookupIterator it(global, name, LookupIterator::HIDDEN);
if (LookupIterator::DATA == it.state()) {
// Now update cell in the script context.
Handle<PropertyCell> cell = it.GetPropertyCell();
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index
0bae94e219dfcb7a5f57f4ecc51fbd4c4ff5a263..ebfd8d54786f1cf1f9762047850513342b35c6f3
100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -628,7 +628,11 @@
UNINITIALIZED_DEPENDENT_TEST(CustomContextDeserialization,
root =
deserializer.DeserializePartial(isolate, global_proxy,
&outdated_contexts).ToHandleChecked();
- CHECK_EQ(3, outdated_contexts->length());
+ if (FLAG_global_var_shortcuts) {
+ CHECK_EQ(5, outdated_contexts->length());
+ } else {
+ CHECK_EQ(3, outdated_contexts->length());
+ }
CHECK(root->IsContext());
Handle<Context> context = Handle<Context>::cast(root);
CHECK(context->global_proxy() == *global_proxy);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.