On Tue, Nov 11, 2008 at 10:46 AM, Nigel Tao <[EMAIL PROTECTED]> wrote: > On Tue, Nov 11, 2008 at 4:50 AM, Jeremy Moskovich <[EMAIL PROTECTED]> wrote: >> * Could you test this on 10.4/10.5 with: Safari 3.1.2, A webkit nightly, > > I've built webkit, and I'm getting a NPP error when I load > gears_init.js. I'm poking around, but was just wondering if you've > seen this before and have any hints. > > 10:44:47 ~/devel/webkit-anonsvn > $ ./WebKitTools/Scripts/run-safari --debug > Starting Safari with DYLD_FRAMEWORK_PATH set to point to built WebKit > in /Users/nigeltao/devel/webkit-anonsvn/WebKitBuild/Debug. > 2008-11-11 10:42:45.164 Safari[68349:80f] Gears: Installing protocol > workaround > 2008-11-11 10:42:45.167 Safari[68349:80f] Gears: protocol workaround installed > 2008-11-11 10:42:45.168 Safari[68349:80f] GearsBrowserLoadHook object created > 2008-11-11 10:42:45.169 Safari[68349:80f] Gears: adding > finishlaunching notification hook > 2008-11-11 10:42:45.169 Safari[68349:80f] Gears: added finishlaunching > notification hook > 2008-11-11 10:42:45.169 Safari[68349:80f] Gears: adding willterminate > notification hook > 2008-11-11 10:42:45.170 Safari[68349:80f] Gears: added willterminate > notification hook > 2008-11-11 10:42:45.170 Safari[68349:80f] Gears: Loading Nibs > 2008-11-11 10:42:45.172 Safari[68349:80f] Gears: Nibs Loaded > 2008-11-11 10:42:45.173 Safari[68349:80f] Loaded Gears version: 0.5.1.0 > 2008-11-11 10:42:46.219 Safari[68349:80f] Gears: finishlaunching hook called > 2008-11-11 10:42:46.221 Safari[68349:80f] GearsSettingsMenuEnabler > installSettingsMenu called > 2008-11-11 10:42:46.222 Safari[68349:80f] GearsSettingsMenuEnabler: > Added Gears settings menu OK > 2008-11-11 10:42:46.223 Safari[68349:80f] GearsSettingsMenuEnabler > installSettingsMenu exited > 2008-11-11 10:42:46.224 Safari[68349:80f] Gears: finishlaunching hook exited > ERROR: NPP_New failed with error: 1 > (/Users/nigeltao/devel/webkit-anonsvn/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:1185 > BOOL -[WebNetscapePluginDocumentView > start](WebNetscapePluginDocumentView*, objc_selector*))
It turns out that Gears (on Safari) declares itself to be a windowless plugin - gears/base/npapi/npp_bindings.cc says: NPN_SetValue(instance, NPPVpluginWindowBool, NULL); Eventually, this gets to WebKit's setVariable method in WebKit/mac/Plugins/WebBaseNetscapePluginView.mm, which as of revision 37000 [1] handled the NPPVpluginWindowBool case, but in today's trunk (r38283), WebNetscapePluginView.mm's setVariable method does not handle NPPVpluginWindowBool, and falls through to returning an error code. Note that the filename changed to remove the "Base". There seems to be a WebKit NPAPI refactoring in progress (if I'm reading trac.webkit.org properly, [EMAIL PROTECTED] has checked in half a dozen changesets to WebKit/mac/Plugins over the last 48 hours), so it seems like I just checked out the WebKit nightly in the middle of their refactoring of NPAPI plugin support. I might just wait this WebKit refactoring out, and punt on testing Gears in a WebKit nightly until at least next week. [1] http://trac.webkit.org/browser/trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm?rev=37000 [2] http://trac.webkit.org/browser/trunk/WebKit/mac/Plugins/WebNetscapePluginView.mm?rev=38283
