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

Side by Side Diff: src/api.cc

Issue 2915793002: [api] Prototype WeakRef implementation
Patch Set: Created 3 years, 6 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') | src/ast/ast-types.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 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 3537 matching lines...) Expand 10 before | Expand all | Expand 10 after
3548 VALUE_IS_SPECIFIC_TYPE(ArgumentsObject, Arguments) 3548 VALUE_IS_SPECIFIC_TYPE(ArgumentsObject, Arguments)
3549 VALUE_IS_SPECIFIC_TYPE(BooleanObject, Boolean) 3549 VALUE_IS_SPECIFIC_TYPE(BooleanObject, Boolean)
3550 VALUE_IS_SPECIFIC_TYPE(NumberObject, Number) 3550 VALUE_IS_SPECIFIC_TYPE(NumberObject, Number)
3551 VALUE_IS_SPECIFIC_TYPE(StringObject, String) 3551 VALUE_IS_SPECIFIC_TYPE(StringObject, String)
3552 VALUE_IS_SPECIFIC_TYPE(SymbolObject, Symbol) 3552 VALUE_IS_SPECIFIC_TYPE(SymbolObject, Symbol)
3553 VALUE_IS_SPECIFIC_TYPE(Date, Date) 3553 VALUE_IS_SPECIFIC_TYPE(Date, Date)
3554 VALUE_IS_SPECIFIC_TYPE(Map, Map) 3554 VALUE_IS_SPECIFIC_TYPE(Map, Map)
3555 VALUE_IS_SPECIFIC_TYPE(Set, Set) 3555 VALUE_IS_SPECIFIC_TYPE(Set, Set)
3556 VALUE_IS_SPECIFIC_TYPE(WeakMap, WeakMap) 3556 VALUE_IS_SPECIFIC_TYPE(WeakMap, WeakMap)
3557 VALUE_IS_SPECIFIC_TYPE(WeakSet, WeakSet) 3557 VALUE_IS_SPECIFIC_TYPE(WeakSet, WeakSet)
3558 VALUE_IS_SPECIFIC_TYPE(WeakRef, WeakRef)
3558 3559
3559 #undef VALUE_IS_SPECIFIC_TYPE 3560 #undef VALUE_IS_SPECIFIC_TYPE
3560 3561
3561 3562
3562 bool Value::IsBoolean() const { 3563 bool Value::IsBoolean() const {
3563 return Utils::OpenHandle(this)->IsBoolean(); 3564 return Utils::OpenHandle(this)->IsBoolean();
3564 } 3565 }
3565 3566
3566 3567
3567 bool Value::IsExternal() const { 3568 bool Value::IsExternal() const {
(...skipping 6895 matching lines...) Expand 10 before | Expand all | Expand 10 after
10463 Address callback_address = 10464 Address callback_address =
10464 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 10465 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
10465 VMState<EXTERNAL> state(isolate); 10466 VMState<EXTERNAL> state(isolate);
10466 ExternalCallbackScope call_scope(isolate, callback_address); 10467 ExternalCallbackScope call_scope(isolate, callback_address);
10467 callback(info); 10468 callback(info);
10468 } 10469 }
10469 10470
10470 10471
10471 } // namespace internal 10472 } // namespace internal
10472 } // namespace v8 10473 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/ast/ast-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698