Status: Unconfirmed Owner: [email protected] Labels: Type-Bug Pri-2 OS-All Area-Misc
New issue 5743 by alastairpatrick: Chrome does not invoke an NPObject's enumerate callback when the JavaScript 'for-in' loop is used http://code.google.com/p/chromium/issues/detail?id=5743 Chrome Version : 1.0.154.36 URLs (if applicable) : Other browsers tested: Add OK or FAIL after other browsers where you have tested this issue: Safari 3: Unknown Firefox 3: OK IE 7: OK (using COM instead of npruntime) What steps will reproduce the problem? 1. In an npruntime plugin, create an NPObject implementing the enumerate callback. The callback should return an array of ids of properties contained in the object. 2. From JavaScript, use the for-in loop to enumerate the properties: var obj = plugin.createObject(); for (var p in obj) { alert(p); } What is the expected result? The NPObject's enumerate callback should be called. All ids returned by the callback should reported as values of 'p' in the for-in loop. What happens instead? The enumerate callback is not called. Please provide any additional information below. Attach a screenshot if possible. I tracked this problem down to CreateV8ObjectForNPObject in webkit/port/bindings/v8/v8_npobject.cpp. The function creates a V8 proxy to wrap the NPObject. However, it does not register either indexed or named property enumerators. CreateV8ObjectForNPObject should register property enumerators that forward to the wrapped NPObject's enumerate callback function. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Chromium-bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/chromium-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
