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

Unified Diff: src/api.cc

Issue 559993005: Move configuration of ResourceConstraints to Isolate construction (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « include/v8.h ('k') | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 94b00ef27002302a1e0306d8c8df9aea02d19e83..3c042d7ab493b5b0b29b8dc57bf4aa99372813aa 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6664,6 +6664,7 @@ Isolate* Isolate::GetCurrent() {
Isolate* Isolate::New(const Isolate::CreateParams& params) {
i::Isolate* isolate = new i::Isolate();
+ Isolate* v8_isolate = reinterpret_cast<Isolate*>(isolate);
if (params.entry_hook) {
isolate->set_function_entry_hook(params.entry_hook);
}
@@ -6672,7 +6673,9 @@ Isolate* Isolate::New(const Isolate::CreateParams& params) {
isolate->logger()->SetCodeEventHandler(kJitCodeEventDefault,
params.code_event_handler);
}
- return reinterpret_cast<Isolate*>(isolate);
+ SetResourceConstraints(v8_isolate,
+ const_cast<ResourceConstraints*>(&params.constraints));
+ return v8_isolate;
}
@@ -6889,6 +6892,13 @@ void v8::Isolate::SetJitCodeEventHandler(JitCodeEventOptions options,
}
+void v8::Isolate::SetStackLimit(uintptr_t stack_limit) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
+ CHECK(stack_limit);
+ isolate->stack_guard()->SetStackLimit(stack_limit);
+}
+
+
String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj)
: str_(NULL), length_(0) {
i::Isolate* isolate = i::Isolate::Current();
« no previous file with comments | « include/v8.h ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698