| Index: Source/bindings/core/v8/ScriptController.cpp
|
| diff --git a/Source/bindings/core/v8/ScriptController.cpp b/Source/bindings/core/v8/ScriptController.cpp
|
| index 59a1ed877cd3dbde3c3ccc0278b2f9b515c29283..056628bf20c635802db7fe311373157e96fb2f39 100644
|
| --- a/Source/bindings/core/v8/ScriptController.cpp
|
| +++ b/Source/bindings/core/v8/ScriptController.cpp
|
| @@ -487,7 +487,8 @@ bool ScriptController::executeScriptIfJavaScriptURL(const KURL& url)
|
| || (!shouldBypassMainWorldContentSecurityPolicy && !frame()->document()->contentSecurityPolicy()->allowJavaScriptURLs(frame()->document()->url(), eventHandlerPosition().m_line)))
|
| return true;
|
|
|
| - if (frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument())
|
| + bool progressNotificationsNeeded = frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() && !frame()->isLoading();
|
| + if (progressNotificationsNeeded)
|
| frame()->loader().progress().progressStarted();
|
|
|
| // We need to hold onto the LocalFrame here because executing script can
|
| @@ -508,8 +509,11 @@ bool ScriptController::executeScriptIfJavaScriptURL(const KURL& url)
|
| if (!frame()->page())
|
| return true;
|
|
|
| - if (result.IsEmpty() || !result->IsString())
|
| + if (result.IsEmpty() || !result->IsString()) {
|
| + if (progressNotificationsNeeded)
|
| + frame()->loader().progress().progressCompleted();
|
| return true;
|
| + }
|
| String scriptResult = toCoreString(v8::Local<v8::String>::Cast(result));
|
|
|
| // We're still in a frame, so there should be a DocumentLoader.
|
|
|