Ignore:
Timestamp:
Sep 2, 2009, 5:18:52 PM (16 years ago)
Author:
[email protected]
Message:

Should crash if JIT code buffer allocation fails.

Patch by Gavin Barraclough <[email protected]> on 2009-09-02
https://bugs.webkit.org/show_bug.cgi?id=28926
<rdar://problem/7031922>

  • jit/ExecutableAllocatorPosix.cpp:

(JSC::ExecutablePool::systemAlloc):

  • jit/ExecutableAllocatorWin.cpp:

(JSC::ExecutablePool::systemAlloc):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/ExecutableAllocatorWin.cpp

    r44341 r48000  
    4343ExecutablePool::Allocation ExecutablePool::systemAlloc(size_t n)
    4444{
    45     ExecutablePool::Allocation alloc = {reinterpret_cast<char*>(VirtualAlloc(0, n, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE)), n};
     45    void* allocation = VirtualAlloc(0, n, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
     46    if (!allocation)
     47        CRASH();
     48    ExecutablePool::Allocation alloc = {reinterpret_cast<char*>(allocation), n};
    4649    return alloc;
    4750}
Note: See TracChangeset for help on using the changeset viewer.