Commit a7f83526 authored by vsevik@chromium.org's avatar vsevik@chromium.org

DevTools: Makes script URL correct for imported documents that have nested imports.

BUG=354445

Review URL: https://codereview.chromium.org/206503004

git-svn-id: svn://svn.chromium.org/blink/trunk@170533 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 532f3959
...@@ -72,9 +72,15 @@ void HTMLScriptRunner::detach() ...@@ -72,9 +72,15 @@ void HTMLScriptRunner::detach()
static KURL documentURLForScriptExecution(Document* document) static KURL documentURLForScriptExecution(Document* document)
{ {
if (!document || !document->frame()) if (!document)
return KURL(); return KURL();
if (!document->frame()) {
if (document->import())
return document->url();
return KURL();
}
// Use the URL of the currently active document for this frame. // Use the URL of the currently active document for this frame.
return document->frame()->document()->url(); return document->frame()->document()->url();
} }
......
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