Bug 29366 - REGRESSION: formatting is broken in console.log()
Summary: REGRESSION: formatting is broken in console.log()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-18 02:50 PDT by Yury Semikhatsky
Modified: 2009-09-18 22:34 PDT (History)
3 users (show)

See Also:


Attachments
patch (5.37 KB, patch)
2009-09-18 08:38 PDT, Yury Semikhatsky
timothy: review-
Details | Formatted Diff | Diff
patch (5.37 KB, patch)
2009-09-18 10:00 PDT, Yury Semikhatsky
timothy: review-
Details | Formatted Diff | Diff
patch (5.33 KB, patch)
2009-09-18 12:22 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2009-09-18 02:50:46 PDT
Template parameters are not substituted in console.log():

Steps:
1) In the error console type  evaluate
console.log('s=%s', 'a string');
2) Look at the output.
Comment 1 Yury Semikhatsky 2009-09-18 08:38:39 PDT
Created attachment 39761 [details]
patch
Comment 2 Timothy Hatcher 2009-09-18 09:17:16 PDT
Comment on attachment 39761 [details]
patch

> +        if (typeof substitution == 'object' && Object.proxyType(substitution) == 'number') {
> +            substitution = substitution.description;
> +        }

Use === here. Also remove the braces.


> +        if (typeof substitution == 'object' && Object.proxyType(substitution) == 'number') {
> +            substitution = substitution.description;
> +        }

Ditto.


> +        if (typeof substitution == 'object' && Object.proxyType(substitution) != 'null') {
> +            substitution = substitution.description;
> +        }

Ditto.

Will r+ when those style changes are made.
Comment 3 Yury Semikhatsky 2009-09-18 10:00:34 PDT
Created attachment 39763 [details]
patch
Comment 4 Yury Semikhatsky 2009-09-18 10:00:58 PDT
(In reply to comment #2)
> (From update of attachment 39761 [details])
> > +        if (typeof substitution == 'object' && Object.proxyType(substitution) == 'number') {
> > +            substitution = substitution.description;
> > +        }
> 
> Use === here. Also remove the braces.
> 
Done.

> 
> > +        if (typeof substitution == 'object' && Object.proxyType(substitution) == 'number') {
> > +            substitution = substitution.description;
> > +        }
> 
> Ditto.
> 
Done.

> 
> > +        if (typeof substitution == 'object' && Object.proxyType(substitution) != 'null') {
> > +            substitution = substitution.description;
> > +        }
> 
> Ditto.
> 
> Will r+ when those style changes are made.
Done.
Comment 5 Timothy Hatcher 2009-09-18 10:58:11 PDT
Comment on attachment 39763 [details]
patch

You still have the braces. Also you should use double quotes for stings.
Comment 6 Yury Semikhatsky 2009-09-18 12:22:13 PDT
Created attachment 39776 [details]
patch
Comment 7 Yury Semikhatsky 2009-09-18 12:22:46 PDT
(In reply to comment #5)
> (From update of attachment 39763 [details])
> You still have the braces.
FIxed.

> Also you should use double quotes for stings.
Done.
Comment 8 Eric Seidel (no email) 2009-09-18 13:17:52 PDT
Comment on attachment 39776 [details]
patch

AFAIK, Yury is not a committer, and I don't believe this patch will break Chromium, so setting commit-queue+.

Yury, if you would like reviewers to set cq+ for you, you should set cq=?.  Or if you have special plans for your patches and don't want them landed automatically, please set cq-.  As-is, I'm just going to go off the assumption that you want this landed normally, but can't because you're not a committer, so I'm cq+'ing it for you.
Comment 9 WebKit Commit Bot 2009-09-18 13:36:05 PDT
Comment on attachment 39776 [details]
patch

Rejecting patch 39776 from commit-queue.

Failed to run "['git', 'svn', 'dcommit']" exit_code: 1
Committing to http://svn.webkit.org/repository/webkit/trunk ...
Merge conflict during commit: Your file or directory 'WebCore/ChangeLog' is probably out-of-date: resource out of date; try updating at /usr/local/libexec/git-core//git-svn line 469
Comment 10 Eric Seidel (no email) 2009-09-18 13:43:25 PDT
Comment on attachment 39776 [details]
patch

Sorry.  bug 28316, will fix.
Comment 11 WebKit Commit Bot 2009-09-18 14:58:46 PDT
Comment on attachment 39776 [details]
patch

Clearing flags on attachment: 39776

Committed r48536: <http://trac.webkit.org/changeset/48536>
Comment 12 WebKit Commit Bot 2009-09-18 14:58:50 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Yury Semikhatsky 2009-09-18 22:34:44 PDT
(In reply to comment #8)
> (From update of attachment 39776 [details])
> AFAIK, Yury is not a committer, and I don't believe this patch will break
> Chromium, so setting commit-queue+.
> 
> Yury, if you would like reviewers to set cq+ for you, you should set cq=?. 
OK, will do next time. I didn't know I need to do something in order my patches get to the commit-queue. Now I see it described in  http://webkit.org/coding/contributing.html. Thanks for your advices!