summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-21 17:43:48 +0000
committerapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-21 17:43:48 +0000
commit914550a5a50f81f3e3717a3ff82af56b30a57ce8 (patch)
tree157f32062830bccee5fa9503958af00e8f46f42a /o3d
parent28119ec7b28e0ab1ac4f3e7a1a59ff34beeb98d1 (diff)
downloadchromium_src-914550a5a50f81f3e3717a3ff82af56b30a57ce8.zip
chromium_src-914550a5a50f81f3e3717a3ff82af56b30a57ce8.tar.gz
chromium_src-914550a5a50f81f3e3717a3ff82af56b30a57ce8.tar.bz2
o3djs.utils.makeClients checks that Renderer has been initialized.
Prevents case where init callback is called before NPP_SetWindow (which initializes the renderer). Review URL: http://codereview.chromium.org/155716 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21188 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/samples/o3djs/util.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/o3d/samples/o3djs/util.js b/o3d/samples/o3djs/util.js
index c5cd6e1..16c0360 100644
--- a/o3d/samples/o3djs/util.js
+++ b/o3d/samples/o3djs/util.js
@@ -853,7 +853,11 @@ o3djs.util.makeClients = function(callback,
for (var cc = 0; cc < clientElements.length; ++cc) {
var element = clientElements[cc];
o3d = element.o3d;
- if (!o3d) {
+ var ready = o3d &&
+ element.client &&
+ element.client.rendererInitStatus >
+ o3djs.util.rendererInitStatus.UNINITIALIZED;
+ if (!ready) {
if (chromeWorkaround) {
if (element.style.width != '100%') {
element.style.width = '100%';