From cd2574a1a98fa3dae8641bf50e56dece2e29ca08 Mon Sep 17 00:00:00 2001 From: "binji@chromium.org" Date: Tue, 22 Oct 2013 18:48:15 +0000 Subject: [NaCl SDK] Re-order the calls to createNaClModule and attachDefaultListeners. If attachDefaultListeners is called after createNaClModule, then there is a potential race condition -- if the module loads quickly enough, the listeners will not yet be attached when the 'load' message is dispatched. BUG=245910 R=sbc@chromium.org Review URL: https://codereview.chromium.org/33423005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230170 0039d316-1c4b-4281-b951-d872f2087c98 --- native_client_sdk/src/examples/demo/nacl_io/example.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'native_client_sdk/src/examples/demo') diff --git a/native_client_sdk/src/examples/demo/nacl_io/example.js b/native_client_sdk/src/examples/demo/nacl_io/example.js index 6de6afb..0ccaf7d 100644 --- a/native_client_sdk/src/examples/demo/nacl_io/example.js +++ b/native_client_sdk/src/examples/demo/nacl_io/example.js @@ -12,8 +12,8 @@ function domContentLoaded(name, tc, config, width, height) { function(bytes) { common.updateStatus( 'Allocated ' + bytes + ' bytes of persistant storage.'); - common.createNaClModule(name, tc, config, width, height); common.attachDefaultListeners(); + common.createNaClModule(name, tc, config, width, height); }, function(e) { alert('Failed to allocate space') }); } -- cgit v1.1