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

Unified Diff: include/v8.h

Issue 15648008: de-isolate Persistent::Dispose (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index b3dff3fee107a6e3992e925b488d8ba760723e50..acc4a86823d93b955ba26ade219ce0e4ea433e6e 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4541,8 +4541,7 @@ class V8EXPORT V8 {
static internal::Object** GlobalizeReference(internal::Isolate* isolate,
internal::Object** handle);
- static void DisposeGlobal(internal::Isolate* isolate,
- internal::Object** global_handle);
+ static void DisposeGlobal(internal::Object** global_handle);
typedef WeakReferenceCallbacks<Value, void>::Revivable RevivableCallback;
static void MakeWeak(internal::Isolate* isolate,
internal::Object** global_handle,
@@ -5486,18 +5485,17 @@ bool Persistent<T>::IsWeak(Isolate* isolate) const {
template <class T>
void Persistent<T>::Dispose() {
- Dispose(Isolate::GetCurrent());
+ if (this->IsEmpty()) return;
+ V8::DisposeGlobal(reinterpret_cast<internal::Object**>(this->val_));
+#ifndef V8_USE_UNSAFE_HANDLES
+ val_ = 0;
+#endif
}
template <class T>
void Persistent<T>::Dispose(Isolate* isolate) {
Sven Panne 2013/05/23 08:09:11 I thought we want to remove this? Or is it just to
dcarney 2013/05/23 08:15:59 yeah, we've only just started moving chrome away f
- if (this->IsEmpty()) return;
- V8::DisposeGlobal(reinterpret_cast<internal::Isolate*>(isolate),
- reinterpret_cast<internal::Object**>(this->val_));
-#ifndef V8_USE_UNSAFE_HANDLES
- val_ = 0;
-#endif
+ Dispose();
}
« 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