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

Unified Diff: src/js/symbol.js

Issue 2551763003: v8::Private::ForApi should be context-independent. (Closed)
Patch Set: fix Created 4 years 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/isolate.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/symbol.js
diff --git a/src/js/symbol.js b/src/js/symbol.js
deleted file mode 100644
index 4ec31ae9bb2ba445821c610981ecbdee4c5a6128..0000000000000000000000000000000000000000
--- a/src/js/symbol.js
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-(function(global, utils) {
-
-"use strict";
-
-%CheckIsBootstrapping();
-
-// -------------------------------------------------------------------
-// Imports
-
-var GlobalSymbol = global.Symbol;
-var hasInstanceSymbol = utils.ImportNow("has_instance_symbol");
-var isConcatSpreadableSymbol =
- utils.ImportNow("is_concat_spreadable_symbol");
-var iteratorSymbol = utils.ImportNow("iterator_symbol");
-var matchSymbol = utils.ImportNow("match_symbol");
-var replaceSymbol = utils.ImportNow("replace_symbol");
-var searchSymbol = utils.ImportNow("search_symbol");
-var speciesSymbol = utils.ImportNow("species_symbol");
-var splitSymbol = utils.ImportNow("split_symbol");
-var toPrimitiveSymbol = utils.ImportNow("to_primitive_symbol");
-var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
-var unscopablesSymbol = utils.ImportNow("unscopables_symbol");
-
-// -------------------------------------------------------------------
-
-function SymbolFor(key) {
- key = TO_STRING(key);
- var registry = %SymbolRegistry();
- if (IS_UNDEFINED(registry.for[key])) {
- var symbol = %CreateSymbol(key);
- registry.for[key] = symbol;
- registry.keyFor[symbol] = key;
- }
- return registry.for[key];
-}
-
-
-function SymbolKeyFor(symbol) {
- if (!IS_SYMBOL(symbol)) throw %make_type_error(kSymbolKeyFor, symbol);
- return %SymbolRegistry().keyFor[symbol];
-}
-
-// -------------------------------------------------------------------
-
-utils.InstallConstants(GlobalSymbol, [
- "hasInstance", hasInstanceSymbol,
- "isConcatSpreadable", isConcatSpreadableSymbol,
- "iterator", iteratorSymbol,
- "match", matchSymbol,
- "replace", replaceSymbol,
- "search", searchSymbol,
- "species", speciesSymbol,
- "split", splitSymbol,
- "toPrimitive", toPrimitiveSymbol,
- "toStringTag", toStringTagSymbol,
- "unscopables", unscopablesSymbol,
-]);
-
-utils.InstallFunctions(GlobalSymbol, DONT_ENUM, [
- "for", SymbolFor,
- "keyFor", SymbolKeyFor
-]);
-
-})
« no previous file with comments | « src/isolate.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698