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

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

Issue 11434015: Merge 135874 - freeV8NPObject: Skip trying to remove object from per context data's ObjectMap if th… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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/platform/chromium/plugins/resources/empty2.html ('k') | no next file » | 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 136064)
+++ Source/WebCore/bindings/v8/NPV8Object.cpp (working copy)
@@ -80,16 +80,17 @@
int v8ObjectHash = v8NpObject->v8Object->GetIdentityHash();
ASSERT(v8ObjectHash);
V8NPObjectMap::iterator iter = v8NPObjectMap->find(v8ObjectHash);
- ASSERT(iter != v8NPObjectMap->end());
- V8NPObjectVector& objects = iter->value;
- for (size_t index = 0; index < objects.size(); ++index) {
- if (objects.at(index) == v8NpObject) {
- objects.remove(index);
- break;
+ if (iter != v8NPObjectMap->end()) {
+ V8NPObjectVector& objects = iter->value;
+ for (size_t index = 0; index < objects.size(); ++index) {
+ if (objects.at(index) == v8NpObject) {
+ objects.remove(index);
+ break;
+ }
}
+ if (objects.isEmpty())
+ v8NPObjectMap->remove(v8ObjectHash);
}
- if (objects.isEmpty())
- v8NPObjectMap->remove(v8ObjectHash);
}
v8NpObject->v8Object.Dispose();
free(v8NpObject);
« no previous file with comments | « LayoutTests/platform/chromium/plugins/resources/empty2.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698