From: | "Alex Alexander (wired)" <wired@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in x11-libs/qt-webkit/files: qt-webkit-4.5.3-no-javascript-crash.patch |
Date: | Wed, 17 Feb 2010 21:20:04 |
Message-Id: | E1NhrJR-0007jZ-Or@stork.gentoo.org |
1 | wired 10/02/17 21:20:01 |
2 | |
3 | Added: qt-webkit-4.5.3-no-javascript-crash.patch |
4 | Log: |
5 | [x11-libs/qt-webkit-4.5.3-r2] added patch that fixes arora's no-javascript crash |
6 | (Portage version: 2.2_rc62/cvs/Linux x86_64) |
7 | |
8 | Revision Changes Path |
9 | 1.1 x11-libs/qt-webkit/files/qt-webkit-4.5.3-no-javascript-crash.patch |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/qt-webkit/files/qt-webkit-4.5.3-no-javascript-crash.patch?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/qt-webkit/files/qt-webkit-4.5.3-no-javascript-crash.patch?rev=1.1&content-type=text/plain |
13 | |
14 | Index: qt-webkit-4.5.3-no-javascript-crash.patch |
15 | =================================================================== |
16 | --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp |
17 | +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp |
18 | @@ -317,4 +317,6 @@ |
19 | javaScriptWindowObjectCleared() signal. |
20 | |
21 | + If Javascript is not enabled for this page, then this method does nothing. |
22 | + |
23 | The \a object will never be explicitly deleted by QtWebKit. |
24 | */ |
25 | @@ -339,8 +341,13 @@ |
26 | javaScriptWindowObjectCleared() signal. |
27 | |
28 | + If Javascript is not enabled for this page, then this method does nothing. |
29 | + |
30 | The ownership of \a object is specified using \a own. |
31 | */ |
32 | void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object, QScriptEngine::ValueOwnership ownership) |
33 | { |
34 | + if (!page()->settings()->testAttribute(QWebSettings::JavascriptEnabled)) |
35 | + return; |
36 | + |
37 | JSC::JSLock lock(false); |
38 | JSDOMWindow* window = toJSDOMWindow(d->frame); |