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

Unified Diff: src/objects.cc

Issue 1784033002: Remove --harmony-tostring runtime flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/js/symbol.js ('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/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index c382547d0ebcbffe7cc9709482e5b07c88012899..844e86327e0c4ad9f2fa4b5a7ba5bab81871cfdd 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2463,11 +2463,9 @@ Handle<String> JSReceiver::GetConstructorName(Handle<JSReceiver> receiver) {
}
}
- if (FLAG_harmony_tostring) {
- Handle<Object> maybe_tag = JSReceiver::GetDataProperty(
- receiver, isolate->factory()->to_string_tag_symbol());
- if (maybe_tag->IsString()) return Handle<String>::cast(maybe_tag);
- }
+ Handle<Object> maybe_tag = JSReceiver::GetDataProperty(
+ receiver, isolate->factory()->to_string_tag_symbol());
+ if (maybe_tag->IsString()) return Handle<String>::cast(maybe_tag);
PrototypeIterator iter(isolate, receiver);
if (iter.IsAtEnd()) return handle(receiver->class_name());
@@ -16647,16 +16645,14 @@ MaybeHandle<String> Object::ObjectProtoToString(Isolate* isolate,
Object::ToObject(isolate, object).ToHandleChecked();
Handle<String> tag;
- if (FLAG_harmony_tostring) {
- Handle<Object> to_string_tag;
- ASSIGN_RETURN_ON_EXCEPTION(
- isolate, to_string_tag,
- JSReceiver::GetProperty(receiver,
- isolate->factory()->to_string_tag_symbol()),
- String);
- if (to_string_tag->IsString()) {
- tag = Handle<String>::cast(to_string_tag);
- }
+ Handle<Object> to_string_tag;
+ ASSIGN_RETURN_ON_EXCEPTION(
+ isolate, to_string_tag,
+ JSReceiver::GetProperty(receiver,
+ isolate->factory()->to_string_tag_symbol()),
+ String);
+ if (to_string_tag->IsString()) {
+ tag = Handle<String>::cast(to_string_tag);
}
if (tag.is_null()) {
« no previous file with comments | « src/js/symbol.js ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698