Commit 83ee2855 authored by alice.liu@apple.com's avatar alice.liu@apple.com

2009-01-05 Oliver Hunt <oliver@apple.com>

        Windows build fixes

        Rubber-stamped by Alice Liu.

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::Interpreter):
        * runtime/ByteArray.cpp:
        (JSC::ByteArray::create):
        * runtime/ByteArray.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2db86ea4
2009-01-05 Oliver Hunt <oliver@apple.com>
Windows build fixes
Rubber-stamped by Alice Liu.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::Interpreter):
* runtime/ByteArray.cpp:
(JSC::ByteArray::create):
* runtime/ByteArray.h:
2009-01-05 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
......
......@@ -608,7 +608,7 @@ Interpreter::Interpreter()
m_jsArrayVptr = jsArray->vptr();
jsArray->~JSCell();
JSByteArray* jsByteArray = new (storage) JSByteArray(JSByteArray::VPtrStealingHack);
JSCell* jsByteArray = new (storage) JSByteArray(JSByteArray::VPtrStealingHack);
m_jsByteArrayVptr = jsByteArray->vptr();
jsByteArray->~JSCell();
......
......@@ -30,7 +30,7 @@ namespace JSC {
PassRefPtr<ByteArray> ByteArray::create(size_t size)
{
unsigned char* buffer = new unsigned char[size + sizeof(ByteArray)];
unsigned char* buffer = new unsigned char[size + sizeof(ByteArray) - sizeof(size_t)];
ASSERT((reinterpret_cast<size_t>(buffer) & 3) == 0);
return adoptRef(new (buffer) ByteArray(size));
}
......
......@@ -63,7 +63,7 @@ namespace JSC {
{
}
size_t m_size;
unsigned char m_data[0];
unsigned char m_data[sizeof(size_t)];
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment