}
-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);
v8::ResourceConstraints constraints;
constraints.set_max_young_space_size(256 * K);
constraints.set_max_old_space_size(5 * K * K);
- v8::SetResourceConstraints(&constraints);
+ v8::SetResourceConstraints(CcTest::isolate(), &constraints);
// Execute a script that causes out of memory.
LocalContext context;
v8::ResourceConstraints constraints;
constraints.set_max_young_space_size(256 * K);
constraints.set_max_old_space_size(5 * K * K);
- v8::SetResourceConstraints(&constraints);
+ v8::SetResourceConstraints(CcTest::isolate(), &constraints);
v8::HandleScope scope(CcTest::isolate());
Local<ObjectTemplate> templ = ObjectTemplate::New();
v8::ResourceConstraints constraints;
constraints.set_max_young_space_size(256 * K);
constraints.set_max_old_space_size(4 * K * K);
- v8::SetResourceConstraints(&constraints);
+ v8::SetResourceConstraints(CcTest::isolate(), &constraints);
// Execute a script that causes out of memory.
v8::V8::IgnoreOutOfMemoryException();
// Set stack limit.
v8::ResourceConstraints constraints;
constraints.set_stack_limit(set_limit);
- CHECK(v8::SetResourceConstraints(&constraints));
+ CHECK(v8::SetResourceConstraints(CcTest::isolate(), &constraints));
// Execute a script.
LocalContext env;
// Set stack limit.
v8::ResourceConstraints constraints;
constraints.set_stack_limit(set_limit);
- CHECK(v8::SetResourceConstraints(&constraints));
+ CHECK(v8::SetResourceConstraints(CcTest::isolate(), &constraints));
// Execute a script.
v8::HandleScope scope(CcTest::isolate());
v8::ResourceConstraints constraints;
constraints.set_max_young_space_size(256 * K);
constraints.set_max_old_space_size(4 * K * K);
- v8::SetResourceConstraints(&constraints);
+ v8::SetResourceConstraints(CcTest::isolate(), &constraints);
break;
}
v8::ResourceConstraints constraints;
constraints.set_max_young_space_size(256 * K);
constraints.set_max_old_space_size(4 * K * K);
- v8::SetResourceConstraints(&constraints);
+ v8::SetResourceConstraints(CcTest::isolate(), &constraints);
// String s is made of 2^17 = 131072 'c' characters and a is an array
// starting with 'bad', followed by 2^14 times the string s. That means the