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

Unified Diff: src/api.h

Issue 1235253007: Revert of [handles] Sanitize Handle and friends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 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: src/api.h
diff --git a/src/api.h b/src/api.h
index 438c4f31dc40967df0208c8ba518f6d83297d077..b20ef5cf66f3cb401875ea40c1a3fca8b3e8045e 100644
--- a/src/api.h
+++ b/src/api.h
@@ -309,6 +309,17 @@
template <class T>
+v8::internal::Handle<T> v8::internal::Handle<T>::EscapeFrom(
+ v8::EscapableHandleScope* scope) {
+ v8::internal::Handle<T> handle;
+ if (!is_null()) {
+ handle = *this;
+ }
+ return Utils::OpenHandle(*scope->Escape(Utils::ToLocal(handle)), true);
+}
+
+
+template <class T>
inline T* ToApi(v8::internal::Handle<v8::internal::Object> obj) {
return reinterpret_cast<T*>(obj.location());
}
« 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