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

Side by Side Diff: Source/web/WebFrameImpl.cpp

Issue 122993002: Make calls to AtomicString(const String&) explicit in web/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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
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 2135 matching lines...) Expand 10 before | Expand all | Expand 10 after
2146 PassRefPtr<Frame> WebFrameImpl::createChildFrame(const FrameLoadRequest& request , HTMLFrameOwnerElement* ownerElement) 2146 PassRefPtr<Frame> WebFrameImpl::createChildFrame(const FrameLoadRequest& request , HTMLFrameOwnerElement* ownerElement)
2147 { 2147 {
2148 ASSERT(m_client); 2148 ASSERT(m_client);
2149 WebFrameImpl* webframe = toWebFrameImpl(m_client->createChildFrame(this, req uest.frameName())); 2149 WebFrameImpl* webframe = toWebFrameImpl(m_client->createChildFrame(this, req uest.frameName()));
2150 2150
2151 webframe->m_frameInit->setFrameHost(frame()->host()); 2151 webframe->m_frameInit->setFrameHost(frame()->host());
2152 webframe->m_frameInit->setOwnerElement(ownerElement); 2152 webframe->m_frameInit->setOwnerElement(ownerElement);
2153 RefPtr<Frame> childFrame = Frame::create(webframe->m_frameInit); 2153 RefPtr<Frame> childFrame = Frame::create(webframe->m_frameInit);
2154 webframe->setWebCoreFrame(childFrame); 2154 webframe->setWebCoreFrame(childFrame);
2155 2155
2156 childFrame->tree().setName(request.frameName()); 2156 childFrame->tree().setName(AtomicString(request.frameName()));
2157 2157
2158 frame()->tree().appendChild(childFrame); 2158 frame()->tree().appendChild(childFrame);
2159 2159
2160 // Frame::init() can trigger onload event in the parent frame, 2160 // Frame::init() can trigger onload event in the parent frame,
2161 // which may detach this frame and trigger a null-pointer access 2161 // which may detach this frame and trigger a null-pointer access
2162 // in FrameTree::removeChild. Move init() after appendChild call 2162 // in FrameTree::removeChild. Move init() after appendChild call
2163 // so that webframe->mFrame is in the tree before triggering 2163 // so that webframe->mFrame is in the tree before triggering
2164 // onload event handler. 2164 // onload event handler.
2165 // Because the event handler may set webframe->mFrame to null, 2165 // Because the event handler may set webframe->mFrame to null,
2166 // it is necessary to check the value after calling init() and 2166 // it is necessary to check the value after calling init() and
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 2490
2491 // There is a possibility that the frame being detached was the only 2491 // There is a possibility that the frame being detached was the only
2492 // pending one. We need to make sure final replies can be sent. 2492 // pending one. We need to make sure final replies can be sent.
2493 flushCurrentScopingEffort(m_findRequestIdentifier); 2493 flushCurrentScopingEffort(m_findRequestIdentifier);
2494 2494
2495 cancelPendingScopingEffort(); 2495 cancelPendingScopingEffort();
2496 } 2496 }
2497 } 2497 }
2498 2498
2499 } // namespace blink 2499 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698