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

Unified Diff: src/factory.h

Issue 23629040: Use raw-to-handle trampoline in [Get/Set]HiddenPropertiesHashTable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.h
diff --git a/src/factory.h b/src/factory.h
index fc48b3201f23b14c4d08e8c1de88d26872b3ade1..1bdf474337c5b6ee0965caf6844e6a09b1628c57 100644
--- a/src/factory.h
+++ b/src/factory.h
@@ -639,6 +639,24 @@ class IdempotentPointerToHandleCodeTrampoline {
: reinterpret_cast<MaybeObject*>(Failure::RetryAfterGC());
}
+ template<typename R, typename P1, typename P2, typename P3, typename P4,
+ typename P5, typename P6, typename P7>
+ MUST_USE_RESULT MaybeObject* CallWithReturnValue(
+ R (*function)(P1, P2, P3, P4, P5, P6, P7),
+ P1 p1,
+ P2 p2,
+ P3 p3,
+ P4 p4,
+ P5 p5,
+ P6 p6,
+ P7 p7) {
+ int collections = isolate_->heap()->gc_count();
+ Handle<Object> result = (*function)(p1, p2, p3, p4, p5, p6, p7);
+ return (collections == isolate_->heap()->gc_count())
+ ? *result
+ : reinterpret_cast<MaybeObject*>(Failure::RetryAfterGC());
+ }
+
private:
Isolate* isolate_;
};
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698