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

Unified Diff: chrome/browser/debugger/debugger_shell.cc

Issue 27365: Add a command line flag --v8-proxy-resolver, to select the new PAC implementa... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address wtc's comments Created 11 years, 10 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 | « no previous file | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/debugger/debugger_shell.cc
===================================================================
--- chrome/browser/debugger/debugger_shell.cc (revision 10746)
+++ chrome/browser/debugger/debugger_shell.cc (working copy)
@@ -35,6 +35,7 @@
io_->Stop();
io_ = NULL;
+ v8::Locker locked;
v8::HandleScope scope;
SubshellFunction("exit", 0, NULL);
v8::V8::RemoveMessageListeners(&DelegateMessageListener);
@@ -46,6 +47,7 @@
void DebuggerShell::Start() {
io_->Start(this);
+ v8::Locker locked;
v8::HandleScope scope;
v8_this_ = v8::Persistent<v8::External>::New(v8::External::New(this));
@@ -215,6 +217,7 @@
}
void DebuggerShell::Debug(TabContents* tab) {
+ v8::Locker locked;
v8::HandleScope outer;
v8::Context::Scope scope(v8_context_);
@@ -228,6 +231,7 @@
}
void DebuggerShell::DebugMessage(const std::wstring& msg) {
+ v8::Locker locked;
v8::HandleScope scope;
if (msg.length()) {
@@ -247,11 +251,13 @@
}
void DebuggerShell::OnDebugAttach() {
+ v8::Locker locked;
v8::HandleScope scope;
SubshellFunction("on_attach", 0, NULL);
}
void DebuggerShell::OnDebugDisconnect() {
+ v8::Locker locked;
v8::HandleScope scope;
SubshellFunction("on_disconnect", 0, NULL);
}
@@ -323,6 +329,7 @@
if (!shell_.IsEmpty()) {
if (!debugger_ready_)
return;
+ v8::Locker locked;
v8::HandleScope outer;
v8::Handle<v8::Value> result = CompileAndRun("shell_.prompt()");
if (!result.IsEmpty() && !result->IsUndefined()) {
@@ -334,6 +341,7 @@
}
void DebuggerShell::ProcessCommand(const std::wstring& data) {
+ v8::Locker locked;
v8::HandleScope outer;
v8::Context::Scope scope(v8_context_);
if (!shell_.IsEmpty() && data.substr(0, 7) != L"source(") {
@@ -375,6 +383,7 @@
}
void DebuggerShell::DidConnect() {
+ v8::Locker locked;
v8::HandleScope outer;
v8::Context::Scope scope(v8_context_);
@@ -384,6 +393,7 @@
}
void DebuggerShell::DidDisconnect() {
+ v8::Locker locked;
v8::HandleScope outer;
SubshellFunction("exit", 0, NULL);
}
@@ -398,6 +408,7 @@
v8::Handle<v8::Value> DebuggerShell::CompileAndRun(
const std::wstring& wstr,
const std::string& filename) {
+ v8::Locker locked;
v8::Context::Scope scope(v8_context_);
v8::Handle<v8::String> scriptname;
if (filename.length() > 0) {
« no previous file with comments | « no previous file | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698