Summary: | [Qt] QScriptEngine doesn't give an access to global object | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jędrzej Nowacki <jedrzej.nowacki> | ||||||
Component: | JavaScriptCore | Assignee: | Jędrzej Nowacki <jedrzej.nowacki> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, kent.hansen, webkit.review.bot | ||||||
Priority: | P2 | Keywords: | Qt | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 31863 | ||||||||
Attachments: |
|
Description
Jędrzej Nowacki
2010-03-25 08:01:27 PDT
Created attachment 51642 [details]
Fix v1
New API
Attachment 51642 [details] did not pass style-queue:
Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WARNING: File exempt from style guide. Skipping: "JavaScriptCore/qt/api/qscriptengine_p.cpp"
JavaScriptCore/qt/tests/qscriptengine/tst_qscriptengine.cpp:63: Missing space after , [whitespace/comma] [3]
WARNING: File exempt from style guide. Skipping: "JavaScriptCore/qt/api/qscriptengine_p.h"
WARNING: File exempt from style guide. Skipping: "JavaScriptCore/qt/api/qscriptengine.cpp"
WARNING: File exempt from style guide. Skipping: "JavaScriptCore/qt/api/qscriptengine.h"
Total errors found: 1 in 6 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 51643 [details]
Fix v2
Fix the space after comma...
Comment on attachment 51643 [details] Fix v2 > + QScriptEngine API was enriched by globalObject() method > + which give an access to the global object. Grammar nitpick: "gives access to..." > +void tst_QScriptEngine::globalObject() > +{ > + QScriptEngine engine; > + QScriptValue global = engine.globalObject(); > + QScriptValue self = engine.evaluate("this"); > + QVERIFY(global.isObject()); > + QVERIFY(engine.globalObject().equals(engine.evaluate("this"))); > + QEXPECT_FAIL("", "strictlyEquals is broken - bug 36600 in bugs.webkit.org", Continue); > + QVERIFY(engine.globalObject().strictlyEquals(self)); > +} We're starting to need property() and setProperty() now; then this test could verify that global variables introduced by evaluate() are reflected by global.property(), and global.setProperty() calls are reflected by evaluate(), since that is a rather crucial feature. Remember to update this test once that API is added. The rest of the patch looks good. Comment on attachment 51643 [details] Fix v2 Clearing flags on attachment: 51643 Committed r56686: <http://trac.webkit.org/changeset/56686> All reviewed patches have been landed. Closing bug. |