Commit 3c8cee2f authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Add isolate parameter to SetResourceConstraints, and deprecate version which...

Add isolate parameter to SetResourceConstraints, and deprecate version which depends on current isolate.

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
parent b45bb175
......@@ -3788,10 +3788,16 @@ class V8_EXPORT ResourceConstraints {
};
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 ---
......
......@@ -568,7 +568,14 @@ ResourceConstraints::ResourceConstraints()
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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment