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

Side by Side Diff: src/api.h

Issue 2060213002: Revert of Replace all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | src/api.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 #ifndef V8_API_H_ 5 #ifndef V8_API_H_
6 #define V8_API_H_ 6 #define V8_API_H_
7 7
8 #include "include/v8-testing.h" 8 #include "include/v8-testing.h"
9 #include "src/contexts.h" 9 #include "src/contexts.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 #define DECLARE_OPEN_HANDLE(From, To) \ 274 #define DECLARE_OPEN_HANDLE(From, To) \
275 static inline v8::internal::Handle<v8::internal::To> \ 275 static inline v8::internal::Handle<v8::internal::To> \
276 OpenHandle(const From* that, bool allow_empty_handle = false); 276 OpenHandle(const From* that, bool allow_empty_handle = false);
277 277
278 OPEN_HANDLE_LIST(DECLARE_OPEN_HANDLE) 278 OPEN_HANDLE_LIST(DECLARE_OPEN_HANDLE)
279 279
280 #undef DECLARE_OPEN_HANDLE 280 #undef DECLARE_OPEN_HANDLE
281 281
282 template<class From, class To> 282 template<class From, class To>
283 static inline Local<To> Convert(v8::internal::Handle<From> obj) { 283 static inline Local<To> Convert(v8::internal::Handle<From> obj) {
284 DCHECK(obj.is_null() || 284 DCHECK(obj.is_null() || !obj->IsTheHole());
285 (obj->IsSmi() ||
286 !obj->IsTheHole(i::HeapObject::cast(*obj)->GetIsolate())));
287 return Local<To>(reinterpret_cast<To*>(obj.location())); 285 return Local<To>(reinterpret_cast<To*>(obj.location()));
288 } 286 }
289 287
290 template <class T> 288 template <class T>
291 static inline v8::internal::Handle<v8::internal::Object> OpenPersistent( 289 static inline v8::internal::Handle<v8::internal::Object> OpenPersistent(
292 const v8::Persistent<T>& persistent) { 290 const v8::Persistent<T>& persistent) {
293 return v8::internal::Handle<v8::internal::Object>( 291 return v8::internal::Handle<v8::internal::Object>(
294 reinterpret_cast<v8::internal::Object**>(persistent.val_)); 292 reinterpret_cast<v8::internal::Object**>(persistent.val_));
295 } 293 }
296 294
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 } 690 }
693 691
694 private: 692 private:
695 static v8::Testing::StressType stress_type_; 693 static v8::Testing::StressType stress_type_;
696 }; 694 };
697 695
698 } // namespace internal 696 } // namespace internal
699 } // namespace v8 697 } // namespace v8
700 698
701 #endif // V8_API_H_ 699 #endif // V8_API_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698