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

Unified Diff: Source/bindings/core/v8/V8NPObject.cpp

Issue 476663002: Gracefully handle property enumeration over deleted plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 | « LayoutTests/plugins/plugin-destroyed-enumerate-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8NPObject.cpp
diff --git a/Source/bindings/core/v8/V8NPObject.cpp b/Source/bindings/core/v8/V8NPObject.cpp
index 4c6ceeddf23ef1ec06a273e5e0c95fa1a49b0fa6..eb298aa566d7f63fd03b82b2c17721239f559dd8 100644
--- a/Source/bindings/core/v8/V8NPObject.cpp
+++ b/Source/bindings/core/v8/V8NPObject.cpp
@@ -373,8 +373,10 @@ void npObjectPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info,
// Verify that our wrapper wasn't using a NPObject which
// has already been deleted.
- if (!npObject || !_NPN_IsAlive(npObject))
+ if (!npObject || !_NPN_IsAlive(npObject)) {
V8ThrowException::throwReferenceError("NPObject deleted", info.GetIsolate());
+ return;
+ }
if (NP_CLASS_STRUCT_VERSION_HAS_ENUM(npObject->_class) && npObject->_class->enumerate) {
uint32_t count;
« no previous file with comments | « LayoutTests/plugins/plugin-destroyed-enumerate-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698