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

Unified Diff: src/api.cc

Issue 570993002: Introduce Isolate::CreateParams (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates 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 e4a00658c5cf3843b572924afe9d426b6a3039f7..94b00ef27002302a1e0306d8c8df9aea02d19e83 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6662,8 +6662,16 @@ Isolate* Isolate::GetCurrent() {
}
-Isolate* Isolate::New() {
+Isolate* Isolate::New(const Isolate::CreateParams& params) {
i::Isolate* isolate = new i::Isolate();
+ if (params.entry_hook) {
+ isolate->set_function_entry_hook(params.entry_hook);
+ }
+ if (params.code_event_handler) {
+ isolate->InitializeLoggingAndCounters();
+ isolate->logger()->SetCodeEventHandler(kJitCodeEventDefault,
+ params.code_event_handler);
+ }
return reinterpret_cast<Isolate*>(isolate);
}
@@ -6872,6 +6880,15 @@ int v8::Isolate::ContextDisposedNotification() {
}
+void v8::Isolate::SetJitCodeEventHandler(JitCodeEventOptions options,
+ JitCodeEventHandler event_handler) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
+ // Ensure that logging is initialized for our isolate.
+ isolate->InitializeLoggingAndCounters();
+ isolate->logger()->SetCodeEventHandler(options, event_handler);
+}
+
+
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