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

Unified Diff: src/api.cc

Issue 7977001: Added ability to lock strings to prevent their representation or encoding from changing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix bug in test when running threaded. Created 9 years, 3 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/handles.h » ('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 ed87fa0ce1ea46edd8add709b8c864842fac064b..6a58417879c438d84d85ae26424f6c421e5b395d 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -4479,6 +4479,9 @@ bool v8::String::MakeExternal(v8::String::ExternalStringResource* resource) {
if (isolate->string_tracker()->IsFreshUnusedString(obj)) {
return false;
}
+ if (isolate->heap()->IsStringLocked(*obj)) {
+ return false;
+ }
if (isolate->heap()->IsInGCPostProcessing()) {
return false;
}
« no previous file with comments | « no previous file | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698