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

Side by Side Diff: Source/core/html/imports/HTMLImportChild.cpp

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 24 matching lines...) Expand all
35 #include "core/dom/custom/CustomElement.h" 35 #include "core/dom/custom/CustomElement.h"
36 #include "core/dom/custom/CustomElementMicrotaskImportStep.h" 36 #include "core/dom/custom/CustomElementMicrotaskImportStep.h"
37 #include "core/html/imports/HTMLImportChildClient.h" 37 #include "core/html/imports/HTMLImportChildClient.h"
38 #include "core/html/imports/HTMLImportLoader.h" 38 #include "core/html/imports/HTMLImportLoader.h"
39 #include "core/html/imports/HTMLImportsController.h" 39 #include "core/html/imports/HTMLImportsController.h"
40 40
41 namespace WebCore { 41 namespace WebCore {
42 42
43 HTMLImportChild::HTMLImportChild(Document& master, const KURL& url, SyncMode syn c) 43 HTMLImportChild::HTMLImportChild(Document& master, const KURL& url, SyncMode syn c)
44 : HTMLImport(sync) 44 : HTMLImport(sync)
45 #if ENABLE(OILPAN)
46 , m_master(&master)
47 #else
45 , m_master(master) 48 , m_master(master)
49 #endif
46 , m_url(url) 50 , m_url(url)
47 , m_customElementMicrotaskStep(0) 51 , m_customElementMicrotaskStep(0)
48 , m_loader(0) 52 , m_loader(0)
49 , m_client(0) 53 , m_client(0)
50 { 54 {
55 #if !ENABLE(OILPAN)
51 m_master.guardRef(); 56 m_master.guardRef();
57 #endif
52 } 58 }
53 59
54 HTMLImportChild::~HTMLImportChild() 60 HTMLImportChild::~HTMLImportChild()
55 { 61 {
56 // importDestroyed() should be called before the destruction. 62 // importDestroyed() should be called before the destruction.
57 ASSERT(!m_loader); 63 ASSERT(!m_loader);
58 64
59 if (m_customElementMicrotaskStep) { 65 if (m_customElementMicrotaskStep) {
60 // if Custom Elements were blocked, must unblock them before death 66 // if Custom Elements were blocked, must unblock them before death
61 m_customElementMicrotaskStep->importDidFinish(); 67 m_customElementMicrotaskStep->importDidFinish();
62 m_customElementMicrotaskStep = 0; 68 m_customElementMicrotaskStep = 0;
63 } 69 }
64 70
65 if (m_client) 71 if (m_client)
66 m_client->importChildWasDestroyed(this); 72 m_client->importChildWasDestroyed(this);
67 73
74 #if !ENABLE(OILPAN)
68 m_master.guardDeref(); 75 m_master.guardDeref();
76 #endif
69 } 77 }
70 78
71 void HTMLImportChild::wasAlreadyLoaded() 79 void HTMLImportChild::wasAlreadyLoaded()
72 { 80 {
73 ASSERT(!m_loader); 81 ASSERT(!m_loader);
74 ASSERT(m_client); 82 ASSERT(m_client);
75 ensureLoader(); 83 ensureLoader();
76 stateWillChange(); 84 stateWillChange();
77 } 85 }
78 86
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 { 216 {
209 HTMLImport::showThis(); 217 HTMLImport::showThis();
210 fprintf(stderr, " loader=%p sync=%s url=%s", 218 fprintf(stderr, " loader=%p sync=%s url=%s",
211 m_loader, 219 m_loader,
212 isSync() ? "Y" : "N", 220 isSync() ? "Y" : "N",
213 url().string().utf8().data()); 221 url().string().utf8().data());
214 } 222 }
215 #endif 223 #endif
216 224
217 } // namespace WebCore 225 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/imports/HTMLImportChild.h ('k') | Source/core/html/shadow/DateTimeEditElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698