BUG=None
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/
38993005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17509
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
};
+V8_DEPRECATED(
+ "Use SetResourceConstraints(isolate, constraints) instead",
+ bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints));
+
+
/**
- * Sets the given ResourceConstraints on the current isolate.
+ * Sets the given ResourceConstraints on the given Isolate.
*/
-bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints);
+bool V8_EXPORT SetResourceConstraints(Isolate* isolate,
+ ResourceConstraints* constraints);
// --- Exceptions ---
bool SetResourceConstraints(ResourceConstraints* constraints) {
i::Isolate* isolate = EnterIsolateIfNeeded();
+ return SetResourceConstraints(reinterpret_cast<Isolate*>(isolate),
+ constraints);
+}
+
+bool SetResourceConstraints(Isolate* v8_isolate,
+ ResourceConstraints* constraints) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
int young_space_size = constraints->max_young_space_size();
int old_gen_size = constraints->max_old_space_size();
int max_executable_size = constraints->max_executable_size();