Revision: 20759
Author: [email protected]
Date: Tue Apr 15 10:45:34 2014 UTC
Log: Removed EnterIsolateIfNeeded and a soon-to-be-useless assertion.
BUG=359977
LOG=y
[email protected]
Review URL: https://codereview.chromium.org/238773003
http://code.google.com/p/v8/source/detail?r=20759
Modified:
/branches/bleeding_edge/src/api.cc
/branches/bleeding_edge/src/isolate.cc
=======================================
--- /branches/bleeding_edge/src/api.cc Tue Apr 15 08:30:42 2014 UTC
+++ /branches/bleeding_edge/src/api.cc Tue Apr 15 10:45:34 2014 UTC
@@ -242,24 +242,6 @@
location,
"Error initializing V8");
}
-
-
-// Some initializing API functions are called early and may be
-// called on a thread different from static initializer thread.
-// If Isolate API is used, Isolate::Enter() will initialize TLS so
-// Isolate::Current() works. If it's a legacy case, then the thread
-// may not have TLS initialized yet. However, in initializing APIs it
-// may be too early to call EnsureInitialized() - some pre-init
-// parameters still have to be configured.
-static inline i::Isolate* EnterIsolateIfNeeded() {
- i::Isolate* isolate = i::Isolate::UncheckedCurrent();
- if (isolate != NULL)
- return isolate;
-
- i::Isolate::EnterDefaultIsolate();
- isolate = i::Isolate::Current();
- return isolate;
-}
StartupDataDecompressor::StartupDataDecompressor()
@@ -391,14 +373,14 @@
void V8::SetFatalErrorHandler(FatalErrorCallback that) {
- i::Isolate* isolate = EnterIsolateIfNeeded();
+ i::Isolate* isolate = i::Isolate::UncheckedCurrent();
isolate->set_exception_behavior(that);
}
void V8::SetAllowCodeGenerationFromStringsCallback(
AllowCodeGenerationFromStringsCallback callback) {
- i::Isolate* isolate = EnterIsolateIfNeeded();
+ i::Isolate* isolate = i::Isolate::UncheckedCurrent();
isolate->set_allow_code_gen_callback(callback);
}
@@ -6308,13 +6290,13 @@
void V8::SetCounterFunction(CounterLookupCallback callback) {
- i::Isolate* isolate = EnterIsolateIfNeeded();
+ i::Isolate* isolate = i::Isolate::UncheckedCurrent();
isolate->stats_table()->SetCounterFunction(callback);
}
void V8::SetCreateHistogramFunction(CreateHistogramCallback callback) {
- i::Isolate* isolate = EnterIsolateIfNeeded();
+ i::Isolate* isolate = i::Isolate::UncheckedCurrent();
isolate->stats_table()->SetCreateHistogramFunction(callback);
isolate->InitializeLoggingAndCounters();
isolate->counters()->ResetHistograms();
@@ -6322,7 +6304,7 @@
void V8::SetAddHistogramSampleFunction(AddHistogramSampleCallback
callback) {
- i::Isolate* isolate = EnterIsolateIfNeeded();
+ i::Isolate* isolate = i::Isolate::UncheckedCurrent();
isolate->stats_table()->
SetAddHistogramSampleFunction(callback);
}
=======================================
--- /branches/bleeding_edge/src/isolate.cc Tue Apr 15 07:47:33 2014 UTC
+++ /branches/bleeding_edge/src/isolate.cc Tue Apr 15 10:45:34 2014 UTC
@@ -1671,10 +1671,7 @@
// Has to be called while counters_ are still alive
runtime_zone_.DeleteKeptSegment();
- // The entry stack must be empty when we get here,
- // except for the default isolate, where it can
- // still contain up to one entry stack item
- ASSERT(entry_stack_ == NULL || this == default_isolate_);
+ // The entry stack must be empty when we get here.
ASSERT(entry_stack_ == NULL || entry_stack_->previous_item == NULL);
delete entry_stack_;
--
--
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/d/optout.