Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1133)

Unified Diff: src/runtime/runtime-literals.cc

Issue 1037273002: Ensure object literal element boilerplates aren't modified. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added comment and REBASE. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-literals.cc
diff --git a/src/runtime/runtime-literals.cc b/src/runtime/runtime-literals.cc
index 83a2fcf45f7e30aff887225bb387395d89272cf7..76226d68f596facea57862488c6a71de1d3e705b 100644
--- a/src/runtime/runtime-literals.cc
+++ b/src/runtime/runtime-literals.cc
@@ -237,6 +237,7 @@ RUNTIME_FUNCTION(Runtime_CreateObjectLiteral) {
CONVERT_SMI_ARG_CHECKED(flags, 3);
bool should_have_fast_elements = (flags & ObjectLiteral::kFastElements) != 0;
bool has_function_literal = (flags & ObjectLiteral::kHasFunction) != 0;
+ bool enable_mementos = (flags & ObjectLiteral::kDisableMementos) == 0;
RUNTIME_ASSERT(literals_index >= 0 && literals_index < literals->length());
@@ -267,7 +268,7 @@ RUNTIME_FUNCTION(Runtime_CreateObjectLiteral) {
Handle<JSObject>(JSObject::cast(site->transition_info()), isolate);
}
- AllocationSiteUsageContext usage_context(isolate, site, true);
+ AllocationSiteUsageContext usage_context(isolate, site, enable_mementos);
usage_context.EnterNewScope();
MaybeHandle<Object> maybe_copy =
JSObject::DeepCopy(boilerplate, &usage_context);
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698