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

Unified Diff: src/messages.js

Issue 546803003: Update ObjectToString to Harmony-draft algorithm (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Teach NoSideEffectToString() that ObjectToString was extended Created 6 years, 2 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 | « src/heap/heap.h ('k') | src/promise.js » ('j') | src/v8natives.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index 2dddffa57ad8cae08d6f445116558dac18e7d4a4..91e24c70157ffb6c2ad87e991e029d9d1dd7f050 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -223,7 +223,7 @@ function NoSideEffectToString(obj) {
return str;
}
if (IS_SYMBOL(obj)) return %_CallFunction(obj, SymbolToString);
- if (IS_OBJECT(obj) && %GetDataProperty(obj, "toString") === ObjectToString) {
+ if (IS_OBJECT(obj) && %GetDataProperty(obj, "toString") === DefaultObjectToString) {
Dmitry Lomov (no reviews) 2014/10/21 06:11:53 Line length
caitp (gmail) 2014/10/21 14:54:45 Acknowledged.
var constructor = %GetDataProperty(obj, "constructor");
if (typeof constructor == "function") {
var constructorName = constructor.name;
@@ -235,6 +235,7 @@ function NoSideEffectToString(obj) {
if (CanBeSafelyTreatedAsAnErrorObject(obj)) {
return %_CallFunction(obj, ErrorToString);
}
+
return %_CallFunction(obj, ObjectToString);
}
« no previous file with comments | « src/heap/heap.h ('k') | src/promise.js » ('j') | src/v8natives.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698