Commit 83e30d0e authored by lazyboy's avatar lazyboy Committed by Commit bot

Fix PreRunValidation calls in two of UIThreadExtensionFunction's subclasses.

From what I can tell, skipping base (UITEF) class's PreRunValidation isn't
a good idea. Make those subclasses include calling the base function.

The two subclasses are:
AppCurrentWindowInternalExtensionFunction and
FileSystemProviderInternalFunction

BUG=None
Test=None, in theory we should correctly send errors to extension APIs when
browser is shutting down.

Review-Url: https://codereview.chromium.org/2617023003
Cr-Commit-Position: refs/heads/master@{#441839}
parent a7eac574
......@@ -147,6 +147,9 @@ FileSystemProviderInternalFunction::FulfillRequest(
}
bool FileSystemProviderInternalFunction::PreRunValidation(std::string* error) {
if (!UIThreadExtensionFunction::PreRunValidation(error))
return false;
std::string file_system_id;
EXTENSION_FUNCTION_PRERUN_VALIDATE(args_->GetString(0, &file_system_id));
......
......@@ -122,6 +122,9 @@ BoundsType GetBoundsType(const std::string& type_as_string) {
bool AppCurrentWindowInternalExtensionFunction::PreRunValidation(
std::string* error) {
if (!UIThreadExtensionFunction::PreRunValidation(error))
return false;
AppWindowRegistry* registry = AppWindowRegistry::Get(browser_context());
DCHECK(registry);
content::WebContents* web_contents = GetSenderWebContents();
......
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