summaryrefslogtreecommitdiffstats
path: root/chrome/browser/debugger
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 21:37:09 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 21:37:09 +0000
commit8699534623783eafa2f64a8bfe98c89bb561bb1a (patch)
tree3628efed1646013baa5ccef2ed99e4ba4b12ab3f /chrome/browser/debugger
parenta514488aafec0dd0eaba9e22e8b5ce0651cff1cd (diff)
downloadchromium_src-8699534623783eafa2f64a8bfe98c89bb561bb1a.zip
chromium_src-8699534623783eafa2f64a8bfe98c89bb561bb1a.tar.gz
chromium_src-8699534623783eafa2f64a8bfe98c89bb561bb1a.tar.bz2
Add a command line flag --v8-proxy-resolver, to select the new PAC implementation.
When running in single process mode, this flag has no effect (since we can't run side by side with the renderer's V8). In regular mode, the v8 resolver is currently running in the browser process. This means it has to share with the v8 debugger shell. Added locking around the debugger shell so they can peacefully co-exist. When this flag is enabled, PAC scripts are downloaded through the browser. BUG=74,2764 Review URL: http://codereview.chromium.org/27365 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10827 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/debugger')
-rw-r--r--chrome/browser/debugger/debugger_shell.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/debugger/debugger_shell.cc b/chrome/browser/debugger/debugger_shell.cc
index ec7d6c4..7b1af30 100644
--- a/chrome/browser/debugger/debugger_shell.cc
+++ b/chrome/browser/debugger/debugger_shell.cc
@@ -35,6 +35,7 @@ DebuggerShell::~DebuggerShell() {
io_->Stop();
io_ = NULL;
+ v8::Locker locked;
v8::HandleScope scope;
SubshellFunction("exit", 0, NULL);
v8::V8::RemoveMessageListeners(&DelegateMessageListener);
@@ -46,6 +47,7 @@ DebuggerShell::~DebuggerShell() {
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::MessageListener(v8::Handle<v8::Message> message) {
}
void DebuggerShell::Debug(TabContents* tab) {
+ v8::Locker locked;
v8::HandleScope outer;
v8::Context::Scope scope(v8_context_);
@@ -228,6 +231,7 @@ void DebuggerShell::Debug(TabContents* tab) {
}
void DebuggerShell::DebugMessage(const std::wstring& msg) {
+ v8::Locker locked;
v8::HandleScope scope;
if (msg.length()) {
@@ -247,11 +251,13 @@ void DebuggerShell::DebugMessage(const std::wstring& msg) {
}
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 @@ void DebuggerShell::PrintPrompt() {
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::PrintPrompt() {
}
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::LoadUserConfig() {
}
void DebuggerShell::DidConnect() {
+ v8::Locker locked;
v8::HandleScope outer;
v8::Context::Scope scope(v8_context_);
@@ -384,6 +393,7 @@ void DebuggerShell::DidConnect() {
}
void DebuggerShell::DidDisconnect() {
+ v8::Locker locked;
v8::HandleScope outer;
SubshellFunction("exit", 0, NULL);
}
@@ -398,6 +408,7 @@ v8::Handle<v8::Value> DebuggerShell::CompileAndRun(
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) {