Commit 128552db authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fixing shared library build of d8.

Review URL: http://codereview.chromium.org/7851013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1e83d2f9
...@@ -4979,12 +4979,18 @@ void V8::RemoveMemoryAllocationCallback(MemoryAllocationCallback callback) { ...@@ -4979,12 +4979,18 @@ void V8::RemoveMemoryAllocationCallback(MemoryAllocationCallback callback) {
void V8::PauseProfiler() { void V8::PauseProfiler() {
ApiCheck(i::FLAG_prof,
"V8::ResumeProfiler",
"Profiling has to be enabled with --prof");
i::Isolate* isolate = i::Isolate::Current(); i::Isolate* isolate = i::Isolate::Current();
isolate->logger()->PauseProfiler(); isolate->logger()->PauseProfiler();
} }
void V8::ResumeProfiler() { void V8::ResumeProfiler() {
ApiCheck(i::FLAG_prof,
"V8::ResumeProfiler",
"Profiling has to be enabled with --prof");
i::Isolate* isolate = i::Isolate::Current(); i::Isolate* isolate = i::Isolate::Current();
isolate->logger()->ResumeProfiler(); isolate->logger()->ResumeProfiler();
} }
......
...@@ -668,12 +668,10 @@ Handle<ObjectTemplate> Shell::CreateGlobalTemplate() { ...@@ -668,12 +668,10 @@ Handle<ObjectTemplate> Shell::CreateGlobalTemplate() {
global_template->Set(String::New("load"), FunctionTemplate::New(Load)); global_template->Set(String::New("load"), FunctionTemplate::New(Load));
global_template->Set(String::New("quit"), FunctionTemplate::New(Quit)); global_template->Set(String::New("quit"), FunctionTemplate::New(Quit));
global_template->Set(String::New("version"), FunctionTemplate::New(Version)); global_template->Set(String::New("version"), FunctionTemplate::New(Version));
if (i::FLAG_prof) { global_template->Set(String::New("enableProfiler"),
global_template->Set(String::New("enableProfiler"), FunctionTemplate::New(EnableProfiler));
FunctionTemplate::New(EnableProfiler)); global_template->Set(String::New("disableProfiler"),
global_template->Set(String::New("disableProfiler"), FunctionTemplate::New(DisableProfiler));
FunctionTemplate::New(DisableProfiler));
}
// Bind the handlers for external arrays. // Bind the handlers for external arrays.
global_template->Set(String::New("Int8Array"), global_template->Set(String::New("Int8Array"),
......
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