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

Side by Side Diff: Source/modules/indexeddb/IDBTransaction.cpp

Issue 213073004: Protecting against other possible uses of invalid V8 execution context. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Noted in description that fix is speculative. Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « Source/modules/indexeddb/IDBDatabase.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 334 }
335 335
336 ExecutionContext* IDBTransaction::executionContext() const 336 ExecutionContext* IDBTransaction::executionContext() const
337 { 337 {
338 return ActiveDOMObject::executionContext(); 338 return ActiveDOMObject::executionContext();
339 } 339 }
340 340
341 bool IDBTransaction::dispatchEvent(PassRefPtr<Event> event) 341 bool IDBTransaction::dispatchEvent(PassRefPtr<Event> event)
342 { 342 {
343 IDB_TRACE("IDBTransaction::dispatchEvent"); 343 IDB_TRACE("IDBTransaction::dispatchEvent");
344 if (m_contextStopped || !executionContext()) {
345 m_state = Finished;
346 return false;
347 }
344 ASSERT(m_state != Finished); 348 ASSERT(m_state != Finished);
345 ASSERT(m_hasPendingActivity); 349 ASSERT(m_hasPendingActivity);
346 ASSERT(executionContext()); 350 ASSERT(executionContext());
347 ASSERT(event->target() == this); 351 ASSERT(event->target() == this);
348 m_state = Finished; 352 m_state = Finished;
349 353
350 // Break reference cycles. 354 // Break reference cycles.
351 for (IDBObjectStoreMap::iterator it = m_objectStoreMap.begin(); it != m_obje ctStoreMap.end(); ++it) 355 for (IDBObjectStoreMap::iterator it = m_objectStoreMap.begin(); it != m_obje ctStoreMap.end(); ++it)
352 it->value->transactionFinished(); 356 it->value->transactionFinished();
353 m_objectStoreMap.clear(); 357 m_objectStoreMap.clear();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 event->setTarget(this); 396 event->setTarget(this);
393 eventQueue->enqueueEvent(event); 397 eventQueue->enqueueEvent(event);
394 } 398 }
395 399
396 blink::WebIDBDatabase* IDBTransaction::backendDB() const 400 blink::WebIDBDatabase* IDBTransaction::backendDB() const
397 { 401 {
398 return m_database->backend(); 402 return m_database->backend();
399 } 403 }
400 404
401 } // namespace WebCore 405 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBDatabase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698