Bug 113651 - Use Vector::reserveInitialCapacity and Vector::uncheckedAppend for JSC's APIs
Summary: Use Vector::reserveInitialCapacity and Vector::uncheckedAppend for JSC's APIs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-30 20:46 PDT by Benjamin Poulain
Modified: 2013-04-01 12:38 PDT (History)
0 users

See Also:


Attachments
Patch (6.22 KB, patch)
2013-03-30 20:48 PDT, Benjamin Poulain
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2013-03-30 20:46:18 PDT
Use Vector::reserveInitialCapacity and Vector::uncheckedAppend for JSC's APIs
Comment 1 Benjamin Poulain 2013-03-30 20:48:45 PDT
Created attachment 195885 [details]
Patch
Comment 2 Andreas Kling 2013-03-31 03:33:07 PDT
Comment on attachment 195885 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=195885&action=review

Sure, r=me.

> Source/JavaScriptCore/API/JSCallbackConstructor.cpp:79
> +        for (size_t i = 0; i < argumentCount; i++)

If I was driving by in this neighborhood, I'd change the i++ to ++i because reasons.

> Source/JavaScriptCore/API/JSCallbackFunction.cpp:75
> +    for (size_t i = 0; i < argumentCount; i++)

And here.

> Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:374
> +            for (size_t i = 0; i < argumentCount; i++)

Probably also here.

> Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:441
> +            for (size_t i = 0; i < argumentCount; i++)

Not sure about here. Well, yeah okay here too.
Comment 3 Benjamin Poulain 2013-04-01 12:38:15 PDT
Committed r147349: <http://trac.webkit.org/changeset/147349>