Changeset 128349 in webkit


Ignore:
Timestamp:
Sep 12, 2012 12:25:52 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Regression(r128338): Broke Windows build
https://bugs.webkit.org/show_bug.cgi?id=96537

Unreviewed build fix.

Fix Apple-Win build by allocating array dynamically
since its size is not constant.

Patch by Christophe Dumez <Christophe Dumez> on 2012-09-12

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::stringArrayToJS):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r128348 r128349  
     12012-09-12  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        Regression(r128338): Broke Windows build
     4        https://bugs.webkit.org/show_bug.cgi?id=96537
     5
     6        Unreviewed build fix.
     7
     8        Fix Apple-Win build by allocating array dynamically
     9        since its size is not constant.
     10
     11        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     12        (WTR::stringArrayToJS):
     13
    1142012-09-12  Alex Sakhartchouk  <alexst@chromium.org>
    215
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r128338 r128349  
    4747#include <wtf/CurrentTime.h>
    4848#include <wtf/HashMap.h>
     49#include <wtf/OwnArrayPtr.h>
     50#include <wtf/PassOwnArrayPtr.h>
    4951#include <wtf/text/StringBuilder.h>
    5052
     
    335337    const size_t count = WKArrayGetSize(strings);
    336338
    337     JSValueRef jsStringsArray[count];
     339    OwnArrayPtr<JSValueRef> jsStringsArray = adoptArrayPtr(new JSValueRef[count]);
    338340    for (size_t i = 0; i < count; ++i) {
    339341        WKStringRef stringRef = static_cast<WKStringRef>(WKArrayGetItemAtIndex(strings, i));
     
    342344    }
    343345
    344     return JSObjectMakeArray(context, count, jsStringsArray, 0);
     346    return JSObjectMakeArray(context, count, jsStringsArray.get(), 0);
    345347}
    346348
Note: See TracChangeset for help on using the changeset viewer.