Changeset 57301 in webkit
- Timestamp:
- Apr 8, 2010 3:55:12 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r57300 r57301 1 2010-04-08 Dumitru Daniliuc <dumi@chromium.org> 2 3 Reviewed by Geoffrey Garen. 4 5 Test that the creation callback is executed in the world where it 6 was created. 7 https://bugs.webkit.org/show_bug.cgi?id=37290 8 9 * storage/open-database-creation-callback-isolated-world-expected.txt: 10 * storage/open-database-creation-callback-isolated-world.html: 11 1 12 2010-04-08 Csaba Osztrogonác <ossy@webkit.org> 2 13 -
trunk/LayoutTests/storage/open-database-creation-callback-isolated-world-expected.txt
r55823 r57301 1 1 ALERT: undefined 2 ALERT: PASS: document.body.bar visible in a callback created in this world. 2 3 This test tests that the openDatabase() creation callback is called in the right world. 3 4 -
trunk/LayoutTests/storage/open-database-creation-callback-isolated-world.html
r55823 r57301 5 5 <div id="console"></div> 6 6 <script> 7 var creationCallbacksExecuted = 0; 7 8 function done() 8 9 { 9 if ( window.layoutTestController)10 if ((++creationCallbacksExecuted == 2) && (window.layoutTestController)) 10 11 layoutTestController.notifyDone(); 11 12 } 12 13 13 function creationCallback (db)14 function creationCallback1(db) 14 15 { 15 16 alert("FAIL: Visible in isolated world."); … … 17 18 } 18 19 20 function creationCallback2(db) 21 { 22 alert(document.body.bar); 23 done(); 24 } 25 19 26 document.body.foo = "FAIL: document.body.foo visible in isolated world."; 27 document.body.bar = "PASS: document.body.bar visible in a callback created in this world."; 20 28 21 29 if (window.layoutTestController) { … … 25 33 layoutTestController.evaluateScriptInIsolatedWorld( 26 34 0, 27 "function creationCallback (db)\n" +35 "function creationCallback1(db)\n" + 28 36 "{\n" + 29 37 " alert(document.body.foo);\n" + 30 38 " window.location='javascript:done()';\n" + 31 39 "}\n" + 32 "var db = openDatabase('OpenDatabaseCreationCallbackIsolatedWorld', '1.0', '', 1, creationCallback);"); 40 "var db1 = openDatabase('OpenDatabaseCreationCallbackIsolatedWorld', '1.0', '', 1, creationCallback1);"); 41 42 var db2 = openDatabase('OpenDatabaseCreationCallbackIsolatedWorld2', '1.0', '', 1, creationCallback2); 33 43 } 34 44 </script> -
trunk/WebCore/ChangeLog
r57299 r57301 1 2010-04-08 Dumitru Daniliuc <dumi@chromium.org> 2 3 Reviewed by Geoffrey Garen. 4 5 Create the creation callback is the current world. 6 https://bugs.webkit.org/show_bug.cgi?id=37290 7 8 * bindings/js/JSDatabaseCallback.cpp: 9 (WebCore::JSDatabaseCallback::JSDatabaseCallback): 10 1 11 2010-04-08 David Hyatt <hyatt@apple.com> 2 12 -
trunk/WebCore/bindings/js/JSDatabaseCallback.cpp
r55823 r57301 36 36 #include "Frame.h" 37 37 #include "JSDatabase.h" 38 #include "ScriptController.h"39 38 #include "ScriptExecutionContext.h" 40 39 #include <runtime/JSLock.h> … … 47 46 JSDatabaseCallback::JSDatabaseCallback(JSObject* callback, JSDOMGlobalObject* globalObject) 48 47 : m_data(new JSCallbackData(callback, globalObject)) 49 , m_isolatedWorld( DOMWrapperWorld::create(globalObject->globalData(), true))48 , m_isolatedWorld(globalObject->world()) 50 49 { 51 50 }
Note: See TracChangeset
for help on using the changeset viewer.