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

Side by Side Diff: src/api.cc

Issue 1017663002: add missing dcheck to ToLocalChecked (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); 610 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
611 return Utils::ToLocal(isolate->eternal_handles()->Get(index)); 611 return Utils::ToLocal(isolate->eternal_handles()->Get(index));
612 } 612 }
613 613
614 614
615 void V8::CheckIsJust(bool is_just) { 615 void V8::CheckIsJust(bool is_just) {
616 Utils::ApiCheck(is_just, "v8::FromJust", "Maybe value is Nothing."); 616 Utils::ApiCheck(is_just, "v8::FromJust", "Maybe value is Nothing.");
617 } 617 }
618 618
619 619
620 void V8::ToLocalEmpty() {
621 Utils::ApiCheck(false, "v8::ToLocalChecked", "Empty MaybeLocal.");
622 }
623
624
620 // --- H a n d l e s --- 625 // --- H a n d l e s ---
621 626
622 627
623 HandleScope::HandleScope(Isolate* isolate) { 628 HandleScope::HandleScope(Isolate* isolate) {
624 Initialize(isolate); 629 Initialize(isolate);
625 } 630 }
626 631
627 632
628 void HandleScope::Initialize(Isolate* isolate) { 633 void HandleScope::Initialize(Isolate* isolate) {
629 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); 634 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
(...skipping 7364 matching lines...) Expand 10 before | Expand all | Expand 10 after
7994 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7999 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7995 Address callback_address = 8000 Address callback_address =
7996 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8001 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7997 VMState<EXTERNAL> state(isolate); 8002 VMState<EXTERNAL> state(isolate);
7998 ExternalCallbackScope call_scope(isolate, callback_address); 8003 ExternalCallbackScope call_scope(isolate, callback_address);
7999 callback(info); 8004 callback(info);
8000 } 8005 }
8001 8006
8002 8007
8003 } } // namespace v8::internal 8008 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698