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

Side by Side Diff: src/api.cc

Issue 18305004: Ensure CheckInitialized is present independent of define. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Force inlining. Created 7 years, 5 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 | Annotate | Revision Log
« 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2903 matching lines...) Expand 10 before | Expand all | Expand 10 after
2914 LOG_API(isolate, "ToInteger"); 2914 LOG_API(isolate, "ToInteger");
2915 ENTER_V8(isolate); 2915 ENTER_V8(isolate);
2916 EXCEPTION_PREAMBLE(isolate); 2916 EXCEPTION_PREAMBLE(isolate);
2917 num = i::Execution::ToInteger(obj, &has_pending_exception); 2917 num = i::Execution::ToInteger(obj, &has_pending_exception);
2918 EXCEPTION_BAILOUT_CHECK(isolate, Local<Integer>()); 2918 EXCEPTION_BAILOUT_CHECK(isolate, Local<Integer>());
2919 } 2919 }
2920 return ToApiHandle<Integer>(num); 2920 return ToApiHandle<Integer>(num);
2921 } 2921 }
2922 2922
2923 2923
2924 #ifdef V8_ENABLE_CHECKS 2924 void i::Internals::CheckInitializedImpl(v8::Isolate* external_isolate) {
2925 void i::Internals::CheckInitialized(v8::Isolate* external_isolate) {
2926 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(external_isolate); 2925 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(external_isolate);
2927 ApiCheck(isolate != NULL && isolate->IsInitialized() && !i::V8::IsDead(), 2926 ApiCheck(isolate != NULL && isolate->IsInitialized() && !i::V8::IsDead(),
2928 "v8::internal::Internals::CheckInitialized()", 2927 "v8::internal::Internals::CheckInitialized()",
2929 "Isolate is not initialized or V8 has died"); 2928 "Isolate is not initialized or V8 has died");
2930 } 2929 }
2931 #endif
2932 2930
2933 2931
2934 void External::CheckCast(v8::Value* that) { 2932 void External::CheckCast(v8::Value* that) {
2935 if (IsDeadCheck(i::Isolate::Current(), "v8::External::Cast()")) return; 2933 if (IsDeadCheck(i::Isolate::Current(), "v8::External::Cast()")) return;
2936 ApiCheck(Utils::OpenHandle(that)->IsExternal(), 2934 ApiCheck(Utils::OpenHandle(that)->IsExternal(),
2937 "v8::External::Cast()", 2935 "v8::External::Cast()",
2938 "Could not convert to external"); 2936 "Could not convert to external");
2939 } 2937 }
2940 2938
2941 2939
(...skipping 5077 matching lines...) Expand 10 before | Expand all | Expand 10 after
8019 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8017 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8020 Address callback_address = 8018 Address callback_address =
8021 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8019 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8022 VMState<EXTERNAL> state(isolate); 8020 VMState<EXTERNAL> state(isolate);
8023 ExternalCallbackScope call_scope(isolate, callback_address); 8021 ExternalCallbackScope call_scope(isolate, callback_address);
8024 return callback(info); 8022 return callback(info);
8025 } 8023 }
8026 8024
8027 8025
8028 } } // namespace v8::internal 8026 } } // 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