Bug 88884 - Web Inspector: working copy should be committed even if domain binding returns error.
Summary: Web Inspector: working copy should be committed even if domain binding return...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-12 10:17 PDT by Pavel Feldman
Modified: 2012-07-04 08:24 PDT (History)
12 users (show)

See Also:


Attachments
Patch (1.53 KB, patch)
2012-06-12 10:20 PDT, Pavel Feldman
vsevik: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2012-06-12 10:17:34 PDT
Committing working copy is about saving file. It should always succeed.
Comment 1 Pavel Feldman 2012-06-12 10:20:08 PDT
Created attachment 147107 [details]
Patch
Comment 2 Pavel Feldman 2012-06-13 04:51:30 PDT
Committed r120186: <http://trac.webkit.org/changeset/120186>
Comment 3 johnjbarton 2012-06-25 21:50:40 PDT
I don't think this fix succeeds because the line

  this.contentChanged(newContent, this._mimeType);

is a notification, not an action causing save.

The save action is in DebuggerResourceBinding.js, in didEditScriptSource(error);
the save is still blocked if (error).

    function didEditScriptSource(error)
    {
        if (error) {
            callback(error);
            return;
        }

        var resource = javaScriptSource.resource();
        if (resource)
            resource.addRevision(newSource);

        callback(null);
    }

See https://code.google.com/p/chromium/issues/detail?id=123242
Comment 4 Vsevolod Vlasov 2012-07-04 08:24:17 PDT
(In reply to comment #3)
> I don't think this fix succeeds because the line
> 
>   this.contentChanged(newContent, this._mimeType);
> 
> is a notification, not an action causing save.
> 
> The save action is in DebuggerResourceBinding.js, in didEditScriptSource(error);
> the save is still blocked if (error).
> 
>     function didEditScriptSource(error)
>     {
>         if (error) {
>             callback(error);
>             return;
>         }
> 
>         var resource = javaScriptSource.resource();
>         if (resource)
>             resource.addRevision(newSource);
> 
>         callback(null);
>     }
> 
> See https://code.google.com/p/chromium/issues/detail?id=123242

Fixed in https://bugs.webkit.org/show_bug.cgi?id=90549