diff options
author | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-22 18:48:15 +0000 |
---|---|---|
committer | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-22 18:48:15 +0000 |
commit | cd2574a1a98fa3dae8641bf50e56dece2e29ca08 (patch) | |
tree | aa172d35890b0d90839cfd4c89fbfce433830565 /native_client_sdk/src/examples/demo | |
parent | 7d5e8cd54f9f99f20360385ab1f77b4c19d7ab16 (diff) | |
download | chromium_src-cd2574a1a98fa3dae8641bf50e56dece2e29ca08.zip chromium_src-cd2574a1a98fa3dae8641bf50e56dece2e29ca08.tar.gz chromium_src-cd2574a1a98fa3dae8641bf50e56dece2e29ca08.tar.bz2 |
[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
Diffstat (limited to 'native_client_sdk/src/examples/demo')
-rw-r--r-- | native_client_sdk/src/examples/demo/nacl_io/example.js | 2 |
1 files changed, 1 insertions, 1 deletions
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') }); } |