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

Side by Side Diff: Source/bindings/v8/V8WindowShell.cpp

Issue 181843003: Don't ignore OOM exceptions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/V8WindowShell.h ('k') | Source/core/loader/FrameLoaderClient.h » ('j') | 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) 2008, 2009, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 context->DetachGlobal(); 102 context->DetachGlobal();
103 103
104 m_perContextData.clear(); 104 m_perContextData.clear();
105 105
106 // It's likely that disposing the context has created a lot of 106 // It's likely that disposing the context has created a lot of
107 // garbage. Notify V8 about this so it'll have a chance of cleaning 107 // garbage. Notify V8 about this so it'll have a chance of cleaning
108 // it up when idle. 108 // it up when idle.
109 V8GCForContextDispose::instanceTemplate().notifyContextDisposed(m_frame->isM ainFrame()); 109 V8GCForContextDispose::instanceTemplate().notifyContextDisposed(m_frame->isM ainFrame());
110 } 110 }
111 111
112 void V8WindowShell::clearForClose(bool destroyGlobal) 112 void V8WindowShell::clearForClose()
113 { 113 {
114 if (destroyGlobal)
115 m_global.clear();
116
117 if (!m_perContextData) 114 if (!m_perContextData)
118 return; 115 return;
119 116
120 m_document.clear(); 117 m_document.clear();
121 disposeContext(DoNotDetachGlobal); 118 disposeContext(DoNotDetachGlobal);
122 } 119 }
123 120
124 void V8WindowShell::clearForNavigation() 121 void V8WindowShell::clearForNavigation()
125 { 122 {
126 if (!m_perContextData) 123 if (!m_perContextData)
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) 489 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin)
493 { 490 {
494 ASSERT(m_world->isMainWorld()); 491 ASSERT(m_world->isMainWorld());
495 if (!m_perContextData) 492 if (!m_perContextData)
496 return; 493 return;
497 v8::HandleScope handleScope(m_isolate); 494 v8::HandleScope handleScope(m_isolate);
498 setSecurityToken(origin); 495 setSecurityToken(origin);
499 } 496 }
500 497
501 } // WebCore 498 } // WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8WindowShell.h ('k') | Source/core/loader/FrameLoaderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698