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
This commit is contained in:
parent
b45bb17547
commit
3c8cee2f8d
10
include/v8.h
10
include/v8.h
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user