Reviewers: Michael Starzinger,

Description:
[runtime] Use utils.InstallFunctions for Symbol.prototype[@@toPrimitive].

[email protected]

Please review this at https://codereview.chromium.org/1310163004/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+4, -4 lines):
  M src/symbol.js


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


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to