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

Unified Diff: src/api.cc

Issue 1312553003: [heap] Prevent direct access to ExternalStringTable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-heap-root-set-1
Patch Set: Addressed comments. Created 5 years, 4 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/extensions/externalize-string-extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 7937c1b1f11a1dde3d0e1b02d16b4a57b2afbe69..c73860f70688608df90cdea913ebe7d14513da69 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5785,7 +5785,7 @@ MaybeLocal<String> v8::String::NewExternalTwoByte(
i::Handle<i::String> string = i_isolate->factory()
->NewExternalStringFromTwoByte(resource)
.ToHandleChecked();
- i_isolate->heap()->external_string_table()->AddString(*string);
+ i_isolate->heap()->RegisterExternalString(*string);
return Utils::ToLocal(string);
}
@@ -5809,7 +5809,7 @@ MaybeLocal<String> v8::String::NewExternalOneByte(
i::Handle<i::String> string = i_isolate->factory()
->NewExternalStringFromOneByte(resource)
.ToHandleChecked();
- i_isolate->heap()->external_string_table()->AddString(*string);
+ i_isolate->heap()->RegisterExternalString(*string);
return Utils::ToLocal(string);
}
@@ -5837,7 +5837,7 @@ bool v8::String::MakeExternal(v8::String::ExternalStringResource* resource) {
DCHECK(!CanMakeExternal() || result);
if (result) {
DCHECK(obj->IsExternalString());
- isolate->heap()->external_string_table()->AddString(*obj);
+ isolate->heap()->RegisterExternalString(*obj);
}
return result;
}
@@ -5861,7 +5861,7 @@ bool v8::String::MakeExternal(
DCHECK(!CanMakeExternal() || result);
if (result) {
DCHECK(obj->IsExternalString());
- isolate->heap()->external_string_table()->AddString(*obj);
+ isolate->heap()->RegisterExternalString(*obj);
}
return result;
}
« no previous file with comments | « no previous file | src/extensions/externalize-string-extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698