diff options
| author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-06-04 14:41:32 +0000 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-06 09:41:13 +0200 |
| commit | 43d40815e5ed44a3dbc89380ae4b8975c4f86cb7 (patch) | |
| tree | cfa0f9624cd79dc632e86c5d7130a5d6cc4cd794 | |
| parent | 0376f73239d78abcd99fcb2dec82e8d1b5132296 (diff) | |
| download | qtwebkit-43d40815e5ed44a3dbc89380ae4b8975c4f86cb7.tar.gz | |
[Qt] Fix a crash in QtPixmapRuntime.
https://bugs.webkit.org/show_bug.cgi?id=117193
Reviewed by Allan Sandfeld Jensen.
The crash could only be reproduced in release builds on Windows.
JSClassCreate calculates the size of JSClassDefinition.staticValues
and staticFunctions by iterating until an entry with a null name is found.
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::QtPixmapRuntime::getClassRef):
Task-number: QTBUG-30736
Change-Id: I443c69fd6772b78edbdadb6270c30229b30d992d
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
| -rw-r--r-- | Source/WebCore/bridge/qt/qt_pixmapruntime.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/WebCore/bridge/qt/qt_pixmapruntime.cpp b/Source/WebCore/bridge/qt/qt_pixmapruntime.cpp index f50465979..1ddf4fdf3 100644 --- a/Source/WebCore/bridge/qt/qt_pixmapruntime.cpp +++ b/Source/WebCore/bridge/qt/qt_pixmapruntime.cpp @@ -249,14 +249,16 @@ JSClassRef QtPixmapRuntime::getClassRef() { static const JSStaticValue staticValues[] = { { "width", getPixmapWidth, 0, 0 }, - { "height", getPixmapHeight, 0, 0 } + { "height", getPixmapHeight, 0, 0 }, + { 0, 0, 0, 0} }; static const JSStaticFunction staticFunctions[] = { { "assignToHTMLImageElement", assignToHTMLImageElement, 0 }, { "toDataUrl", pixmapToDataUrl, 0 }, { "toImageData", pixmapToImageData, 0 }, - { "toString", pixmapToString, 0 } + { "toString", pixmapToString, 0 }, + { 0, 0, 0 } }; static const JSClassDefinition classDefinition = { |
