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

Unified Diff: src/symbol.js

Issue 196103004: Add support for per-isolate private symbols (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 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
« src/runtime.cc ('K') | « src/runtime.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/symbol.js
diff --git a/src/symbol.js b/src/symbol.js
index 49f909694c19f3ee44c60a39def7fbbd0f39c6a5..48c88c33c75c6f4569d97a682368e007f7a9d033 100644
--- a/src/symbol.js
+++ b/src/symbol.js
@@ -65,10 +65,13 @@ function SymbolValueOf() {
function GetSymbolRegistry() {
var registry = %SymbolRegistry();
- if (!('internal' in registry)) {
- registry.internal = {__proto__: null};
+ if (!('for' in registry)) {
registry.for = {__proto__: null};
+ registry.for_intern = {__proto__: null};
registry.keyFor = {__proto__: null};
+ // Other members are added and used in runtime and API functions:
+ // registry.private_intern
+ // registry.private_api
}
return registry;
}
@@ -76,10 +79,10 @@ function GetSymbolRegistry() {
function InternalSymbol(key) {
var registry = GetSymbolRegistry();
- if (!(key in registry.internal)) {
- registry.internal[key] = %CreateSymbol(key);
+ if (!(key in registry.for_intern)) {
+ registry.for_intern[key] = %CreateSymbol(key);
}
- return registry.internal[key];
+ return registry.for_intern[key];
}
« src/runtime.cc ('K') | « src/runtime.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698