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

Side by Side Diff: Source/WebCore/bindings/v8/V8IsolatedContext.cpp

Issue 10386064: Revert 114320 - [V8] Don't delete the per context data until the V8IsolatedContext is deleted (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 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 | « LayoutTests/http/tests/security/isolatedWorld/context-destroy-expected.txt ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // created contexts so that they can all be updated when the 98 // created contexts so that they can all be updated when the
99 // document domain 99 // document domain
100 // changes. 100 // changes.
101 m_context->get()->UseDefaultSecurityToken(); 101 m_context->get()->UseDefaultSecurityToken();
102 102
103 m_frame->loader()->client()->didCreateScriptContext(context(), extensionGrou p, m_world->id()); 103 m_frame->loader()->client()->didCreateScriptContext(context(), extensionGrou p, m_world->id());
104 } 104 }
105 105
106 void V8IsolatedContext::destroy() 106 void V8IsolatedContext::destroy()
107 { 107 {
108 m_perContextData.clear();
108 m_frame->loader()->client()->willReleaseScriptContext(context(), m_world->id ()); 109 m_frame->loader()->client()->willReleaseScriptContext(context(), m_world->id ());
109 m_context->get().MakeWeak(this, &contextWeakReferenceCallback); 110 m_context->get().MakeWeak(this, &contextWeakReferenceCallback);
110 m_frame = 0; 111 m_frame = 0;
111 } 112 }
112 113
113 V8IsolatedContext::~V8IsolatedContext() 114 V8IsolatedContext::~V8IsolatedContext()
114 { 115 {
115 m_context->disposeHandle(); 116 m_context->disposeHandle();
116 } 117 }
117 118
118 void V8IsolatedContext::setSecurityOrigin(PassRefPtr<SecurityOrigin> securityOri gin) 119 void V8IsolatedContext::setSecurityOrigin(PassRefPtr<SecurityOrigin> securityOri gin)
119 { 120 {
120 m_securityOrigin = securityOrigin; 121 m_securityOrigin = securityOrigin;
121 } 122 }
122 123
123 } // namespace WebCore 124 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/security/isolatedWorld/context-destroy-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698