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

Side by Side Diff: src/api.cc

Issue 2194863002: Fix typo in EscapableHandleScope::Escape (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | 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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 EscapableHandleScope::EscapableHandleScope(Isolate* v8_isolate) { 893 EscapableHandleScope::EscapableHandleScope(Isolate* v8_isolate) {
894 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); 894 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
895 escape_slot_ = CreateHandle(isolate, isolate->heap()->the_hole_value()); 895 escape_slot_ = CreateHandle(isolate, isolate->heap()->the_hole_value());
896 Initialize(v8_isolate); 896 Initialize(v8_isolate);
897 } 897 }
898 898
899 899
900 i::Object** EscapableHandleScope::Escape(i::Object** escape_value) { 900 i::Object** EscapableHandleScope::Escape(i::Object** escape_value) {
901 i::Heap* heap = reinterpret_cast<i::Isolate*>(GetIsolate())->heap(); 901 i::Heap* heap = reinterpret_cast<i::Isolate*>(GetIsolate())->heap();
902 Utils::ApiCheck((*escape_slot_)->IsTheHole(heap->isolate()), 902 Utils::ApiCheck((*escape_slot_)->IsTheHole(heap->isolate()),
903 "EscapeableHandleScope::Escape", "Escape value set twice"); 903 "EscapableHandleScope::Escape", "Escape value set twice");
904 if (escape_value == NULL) { 904 if (escape_value == NULL) {
905 *escape_slot_ = heap->undefined_value(); 905 *escape_slot_ = heap->undefined_value();
906 return NULL; 906 return NULL;
907 } 907 }
908 *escape_slot_ = *escape_value; 908 *escape_slot_ = *escape_value;
909 return escape_slot_; 909 return escape_slot_;
910 } 910 }
911 911
912 912
913 SealHandleScope::SealHandleScope(Isolate* isolate) { 913 SealHandleScope::SealHandleScope(Isolate* isolate) {
(...skipping 8124 matching lines...) Expand 10 before | Expand all | Expand 10 after
9038 Address callback_address = 9038 Address callback_address =
9039 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9039 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9040 VMState<EXTERNAL> state(isolate); 9040 VMState<EXTERNAL> state(isolate);
9041 ExternalCallbackScope call_scope(isolate, callback_address); 9041 ExternalCallbackScope call_scope(isolate, callback_address);
9042 callback(info); 9042 callback(info);
9043 } 9043 }
9044 9044
9045 9045
9046 } // namespace internal 9046 } // namespace internal
9047 } // namespace v8 9047 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698