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

Unified Diff: src/accessors.cc

Issue 1704353002: [runtime] Force internalize names used before lookup in in DescriptorArray and TransitionArray (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | src/compiler/access-info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index 6cb3b55b39ffab4bbd530ad7bb2a0135844a57b6..8d78b8fc26b77362e21b6301e023facecfee53e4 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -32,7 +32,7 @@ Handle<AccessorInfo> Accessors::MakeAccessor(
info->set_all_can_read(false);
info->set_all_can_write(false);
info->set_is_special_data_property(true);
- info->set_name(*name);
+ info->set_name(*factory->InternalizeName(name));
Handle<Object> get = v8::FromCData(isolate, getter);
if (setter == nullptr) setter = &ReconfigureToDataProperty;
Handle<Object> set = v8::FromCData(isolate, setter);
@@ -82,6 +82,7 @@ bool Accessors::IsJSObjectFieldAccessor(Handle<Map> map, Handle<Name> name,
bool Accessors::IsJSArrayBufferViewFieldAccessor(Handle<Map> map,
Handle<Name> name,
int* object_offset) {
+ DCHECK(name->IsUniqueName());
Isolate* isolate = name->GetIsolate();
switch (map->instance_type()) {
« no previous file with comments | « no previous file | src/compiler/access-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698