Bug 115561 - Web Inspector: WK1 implementation of InspectorFrontendHost.save() triggers script error
Summary: Web Inspector: WK1 implementation of InspectorFrontendHost.save() triggers sc...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.8
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2013-05-03 11:37 PDT by Brian Burg
Modified: 2013-05-05 17:26 PDT (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2013-05-03 11:37:39 PDT
Running from Mac MiniBrowser's inspector console:

InspectorFrontendHost.save("file:///~/Desktop/foo.txt", "test", true)

will cause the following error:

TypeError: 'undefined' is not a function (evaluating 'InspectorFrontendAPI.savedURL("file://localhost/Users/burg/Desktop/foo.txt ")')

This is called from WebInspectorFrontendClient::save (in WebCoreSupport/WebInspectorClient.mm). It was introduced in https://bugs.webkit.org/show_bug.cgi?id=105547.

It seems like the InspectorFrontendAPI.savedURL function is not being exposed to script, or the savedURL callback is being executed in the wrong script context.
Comment 1 Timothy Hatcher 2013-05-03 13:19:17 PDT
Looks like we need to implement InspectorFrontendAPI.savedURL this on the Safari front end. 

I'll add InspectorFrontendAPI.savedURL and InspectorFrontendAPI.appendedToURL as stubs.
Comment 2 Timothy Hatcher 2013-05-03 13:26:26 PDT
(I assume you were using Safari's Web Inspector?)
Comment 3 Brian Burg 2013-05-03 13:43:36 PDT
Yes, it was using the Safari web inspector, from about a day ago.
Comment 4 Timothy Hatcher 2013-05-03 13:44:48 PDT
I'll push a fix in the nightly soon.
Comment 5 Radar WebKit Bug Importer 2013-05-03 13:45:05 PDT
Comment 6 Timothy Hatcher 2013-05-05 17:26:20 PDT
This is fixed. It should be in the nightly now or the next build.