Reviewers: danno,
Description:
Ensure CheckInitialized is present independent of define.
This makes sure that the same symbols are present, independent of which
defines have been used while building V8. Otherwise only embedders with
compatible defines would be able to link against that binary.
[email protected]
BUG=chromium:255779
Please review this at https://codereview.chromium.org/18305004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M include/v8.h
M src/api.cc
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index
cf01684729d9f4a433fbd1008d728752de6919a5..35ec462dc8a685393124d49e5a7d76348ab57d65
100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -5397,11 +5397,12 @@ class Internals {
static const int kUndefinedOddballKind = 5;
static const int kNullOddballKind = 3;
+ static void CheckInitializedImpl(v8::Isolate* isolate);
+ V8_INLINE(static void CheckInitialized(v8::Isolate* isolate)) {
#ifdef V8_ENABLE_CHECKS
- static void CheckInitialized(v8::Isolate* isolate);
-#else
- static void CheckInitialized(v8::Isolate* isolate) { }
+ CheckInitializedImpl(isolate);
#endif
+ }
V8_INLINE(static bool HasHeapObjectTag(internal::Object* value)) {
return ((reinterpret_cast<intptr_t>(value) & kHeapObjectTagMask) ==
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index
edffca18f42c7e792da0857f512172b27238a315..0abc305596a2f368123352319f5df9561012937e
100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2921,14 +2921,12 @@ Local<Integer> Value::ToInteger() const {
}
-#ifdef V8_ENABLE_CHECKS
-void i::Internals::CheckInitialized(v8::Isolate* external_isolate) {
+void i::Internals::CheckInitializedImpl(v8::Isolate* external_isolate) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(external_isolate);
ApiCheck(isolate != NULL && isolate->IsInitialized() && !i::V8::IsDead(),
"v8::internal::Internals::CheckInitialized()",
"Isolate is not initialized or V8 has died");
}
-#endif
void External::CheckCast(v8::Value* that) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.