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

Unified Diff: src/symbol.js

Issue 1310163004: [runtime] Use utils.InstallFunctions for Symbol.prototype[@@toPrimitive]. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | no next file » | 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 84386a96bde60d77a5fc1c7f2f64db2c69db9bba..2f68eff24197a6354d70905baf7422f8635dc598 100644
--- a/src/symbol.js
+++ b/src/symbol.js
@@ -119,13 +119,13 @@ utils.InstallFunctions(GlobalSymbol, DONT_ENUM, [
%AddNamedProperty(
GlobalSymbol.prototype, "constructor", GlobalSymbol, DONT_ENUM);
-utils.SetFunctionName(SymbolToPrimitive, toPrimitiveSymbol);
-%AddNamedProperty(
- GlobalSymbol.prototype, toPrimitiveSymbol, SymbolToPrimitive,
- DONT_ENUM | READ_ONLY);
%AddNamedProperty(
GlobalSymbol.prototype, toStringTagSymbol, "Symbol", DONT_ENUM | READ_ONLY);
+utils.InstallFunctions(GlobalSymbol.prototype, DONT_ENUM | READ_ONLY, [
+ toPrimitiveSymbol, SymbolToPrimitive
+]);
+
utils.InstallFunctions(GlobalSymbol.prototype, DONT_ENUM, [
"toString", SymbolToString,
"valueOf", SymbolValueOf
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698