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

Side by Side Diff: third_party/WebKit/LayoutTests/storage/indexeddb/empty-crash.html

Issue 1780593002: V8 Bindings: Don't attempt to set an empty V8HiddenValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>IndexedDB: Don't crash accessing cached properties in disconnected frame< /title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script id="scriptid" type="javascript/frame-script">
6 // This script is run in an IFRAME.
7
8 var dbname = 'db-' + String(document.location);
9 indexedDB.deleteDatabase(dbname);
10 var open = indexedDB.open(dbname);
11 open.onupgradeneeded = function() {
12 var db = open.result;
13 var store = db.createObjectStore('store');
14 };
15
16 open.onsuccess = function() {
17 db = open.result;
18 var tx = db.transaction('store');
19 var req = tx.objectStore('store').get(0);
20 req.onsuccess = function() {
21 frameElement.parentNode.removeChild(frameElement);
22 var result = req.result;
23 };
24 };
25 </script>
26
27 <script>
28 async_test(function(t) {
29 var script = document.querySelector('#scriptid').textContent;
30 var blob = new Blob(['<script>', script, '<\/script>'], {'type': 'text/html' });
31 var iframe = document.createElement('iframe');
32 document.documentElement.appendChild(iframe);
33 iframe.src = URL.createObjectURL(blob);
34
35 // Wait for IFRAME to remove itself; the test passes as long as it
36 // does not crash.
37 var id = setInterval(t.step_func(function() {
38 if (!document.querySelector('iframe')) {
39 clearInterval(id);
40 t.done();
41 }
42 }), 10);
43
44 }, 'Accessing cached attributes after frame disconnect should not crash.');
45 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698