Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Unified Diff: Source/WebCore/bindings/v8/NPV8Object.cpp

Issue 8212005: Merge 96991 - https://bugs.webkit.org/show_bug.cgi?id=69471 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/bindings/v8/NPObjectWrapper.cpp ('k') | Source/WebCore/bindings/v8/ScriptController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/bindings/v8/NPV8Object.cpp
===================================================================
--- Source/WebCore/bindings/v8/NPV8Object.cpp (revision 97018)
+++ Source/WebCore/bindings/v8/NPV8Object.cpp (working copy)
@@ -31,6 +31,7 @@
#include "PlatformSupport.h"
#include "DOMWindow.h"
#include "Frame.h"
+#include "NPObjectWrapper.h"
#include "OwnArrayPtr.h"
#include "PlatformString.h"
#include "ScriptSourceCode.h"
@@ -283,8 +284,13 @@
if (!npObject)
return false;
- if (npObject->_class != npScriptObjectClass)
- return false;
+ if (npObject->_class != npScriptObjectClass) {
+ // Check if the object passed in is wrapped. If yes, then we need to invoke on the underlying object.
+ NPObject* actualObject = NPObjectWrapper::getUnderlyingNPObject(npObject);
+ if (!actualObject)
+ return false;
+ npObject = actualObject;
+ }
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = toV8Context(npp, npObject);
« no previous file with comments | « Source/WebCore/bindings/v8/NPObjectWrapper.cpp ('k') | Source/WebCore/bindings/v8/ScriptController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698