| Index: content/browser/debugger/devtools_window.cc
|
| diff --git a/content/browser/debugger/devtools_window.cc b/content/browser/debugger/devtools_window.cc
|
| index a7aae48077059f84baa119977cb93f747ee41736..8d0abbb9e01cdaf9ffd34e7eb1fa4309e9acd495 100644
|
| --- a/content/browser/debugger/devtools_window.cc
|
| +++ b/content/browser/debugger/devtools_window.cc
|
| @@ -75,6 +75,12 @@ DevToolsWindow* DevToolsWindow::FindDevToolsWindow(
|
| }
|
|
|
| // static
|
| +DevToolsWindow* DevToolsWindow::CreateDevToolsWindowForWorker(
|
| + Profile* profile) {
|
| + return new DevToolsWindow(profile, NULL, false);
|
| +}
|
| +
|
| +// static
|
| DevToolsWindow* DevToolsWindow::OpenDevToolsWindow(
|
| RenderViewHost* inspected_rvh) {
|
| return ToggleDevToolsWindow(inspected_rvh, true,
|
| @@ -131,10 +137,12 @@ DevToolsWindow::DevToolsWindow(Profile* profile,
|
| this,
|
| chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
|
| Source<ThemeService>(ThemeServiceFactory::GetForProfile(profile_)));
|
| - TabContents* tab = inspected_rvh->delegate()->GetAsTabContents();
|
| - if (tab)
|
| - inspected_tab_ = TabContentsWrapper::GetCurrentWrapperForContents(tab);
|
| -
|
| + // There is no inspected_rvh in case of shared workers.
|
| + if (inspected_rvh) {
|
| + TabContents* tab = inspected_rvh->delegate()->GetAsTabContents();
|
| + if (tab)
|
| + inspected_tab_ = TabContentsWrapper::GetCurrentWrapperForContents(tab);
|
| + }
|
| instances_.push_back(this);
|
| }
|
|
|
|
|