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

Side by Side Diff: src/objects.cc

Issue 1919143004: Renaming cleanup of Promises (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/js/promise-extra.js ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 577
578 578
579 bool Object::IsPromise(Handle<Object> object) { 579 bool Object::IsPromise(Handle<Object> object) {
580 if (!object->IsJSObject()) return false; 580 if (!object->IsJSObject()) return false;
581 auto js_object = Handle<JSObject>::cast(object); 581 auto js_object = Handle<JSObject>::cast(object);
582 // Promises can't have access checks. 582 // Promises can't have access checks.
583 if (js_object->map()->is_access_check_needed()) return false; 583 if (js_object->map()->is_access_check_needed()) return false;
584 auto isolate = js_object->GetIsolate(); 584 auto isolate = js_object->GetIsolate();
585 // TODO(dcarney): this should just be read from the symbol registry so as not 585 // TODO(dcarney): this should just be read from the symbol registry so as not
586 // to be context dependent. 586 // to be context dependent.
587 auto key = isolate->factory()->promise_status_symbol(); 587 auto key = isolate->factory()->promise_state_symbol();
588 // Shouldn't be possible to throw here. 588 // Shouldn't be possible to throw here.
589 return JSObject::HasRealNamedProperty(js_object, key).FromJust(); 589 return JSObject::HasRealNamedProperty(js_object, key).FromJust();
590 } 590 }
591 591
592 592
593 // static 593 // static
594 MaybeHandle<Object> Object::GetMethod(Handle<JSReceiver> receiver, 594 MaybeHandle<Object> Object::GetMethod(Handle<JSReceiver> receiver,
595 Handle<Name> name) { 595 Handle<Name> name) {
596 Handle<Object> func; 596 Handle<Object> func;
597 Isolate* isolate = receiver->GetIsolate(); 597 Isolate* isolate = receiver->GetIsolate();
(...skipping 18463 matching lines...) Expand 10 before | Expand all | Expand 10 after
19061 if (cell->value() != *new_value) { 19061 if (cell->value() != *new_value) {
19062 cell->set_value(*new_value); 19062 cell->set_value(*new_value);
19063 Isolate* isolate = cell->GetIsolate(); 19063 Isolate* isolate = cell->GetIsolate();
19064 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19064 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19065 isolate, DependentCode::kPropertyCellChangedGroup); 19065 isolate, DependentCode::kPropertyCellChangedGroup);
19066 } 19066 }
19067 } 19067 }
19068 19068
19069 } // namespace internal 19069 } // namespace internal
19070 } // namespace v8 19070 } // namespace v8
OLDNEW
« no previous file with comments | « src/js/promise-extra.js ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698