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

Unified Diff: src/api.h

Issue 24345003: remove Isolate::GetCurrent from Context api functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comments Created 7 years, 3 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 | « samples/lineprocessor.cc ('k') | 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 51bc4942b24964007ac40736e103175521b4c337..7dfa36d1c2dc2a945f4884df0f19239ae25f5d7a 100644
--- a/src/api.h
+++ b/src/api.h
@@ -543,7 +543,7 @@ class HandleScopeImplementer {
inline bool CallDepthIsZero() { return call_depth_ == 0; }
inline void EnterContext(Handle<Object> context);
- inline bool LeaveLastContext();
+ inline bool LeaveContext(Handle<Object> context);
// Returns the last entered context or an empty handle if no
// contexts have been entered.
@@ -635,8 +635,10 @@ void HandleScopeImplementer::EnterContext(Handle<Object> context) {
}
-bool HandleScopeImplementer::LeaveLastContext() {
+bool HandleScopeImplementer::LeaveContext(Handle<Object> context) {
if (entered_contexts_.is_empty()) return false;
+ // TODO(dcarney): figure out what's wrong here
+ // if (*entered_contexts_.last() != *context) return false;
entered_contexts_.RemoveLast();
return true;
}
« no previous file with comments | « samples/lineprocessor.cc ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698