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

Side by Side Diff: Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp

Issue 297863004: Merge 174141 "HTML Imports: Take care of cycles according to the..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1985/
Patch Set: 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 : m_import(import->weakPtr()) 48 : m_import(import->weakPtr())
49 , m_queue(import->loader()->microtaskQueue()) 49 , m_queue(import->loader()->microtaskQueue())
50 , m_weakFactory(this) 50 , m_weakFactory(this)
51 { 51 {
52 } 52 }
53 53
54 CustomElementMicrotaskImportStep::~CustomElementMicrotaskImportStep() 54 CustomElementMicrotaskImportStep::~CustomElementMicrotaskImportStep()
55 { 55 {
56 } 56 }
57 57
58 void CustomElementMicrotaskImportStep::parentWasChanged()
59 {
60 m_queue = CustomElementMicrotaskQueue::create();
61 m_import.clear();
62 }
63
58 bool CustomElementMicrotaskImportStep::shouldWaitForImport() const 64 bool CustomElementMicrotaskImportStep::shouldWaitForImport() const
59 { 65 {
60 return m_import && !m_import->isLoaded(); 66 return m_import && !m_import->isLoaded();
61 } 67 }
62 68
63 bool CustomElementMicrotaskImportStep::shouldStopProcessing() const 69 bool CustomElementMicrotaskImportStep::shouldStopProcessing() const
64 { 70 {
65 return m_import && m_import->isSync(); 71 return m_import && m_import->isSync();
66 } 72 }
67 73
(...skipping 19 matching lines...) Expand all
87 93
88 #if !defined(NDEBUG) 94 #if !defined(NDEBUG)
89 void CustomElementMicrotaskImportStep::show(unsigned indent) 95 void CustomElementMicrotaskImportStep::show(unsigned indent)
90 { 96 {
91 fprintf(stderr, "%*sImport(wait=%d sync=%d, url=%s)\n", indent, "", shouldWa itForImport(), shouldStopProcessing(), m_import ? m_import->url().string().utf8( ).data() : "null"); 97 fprintf(stderr, "%*sImport(wait=%d sync=%d, url=%s)\n", indent, "", shouldWa itForImport(), shouldStopProcessing(), m_import ? m_import->url().string().utf8( ).data() : "null");
92 m_queue->show(indent + 1); 98 m_queue->show(indent + 1);
93 } 99 }
94 #endif 100 #endif
95 101
96 } // namespace WebCore 102 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/custom/CustomElementMicrotaskImportStep.h ('k') | Source/core/html/imports/HTMLImportChild.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698