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

Unified Diff: third_party/WebKit/Source/core/dom/StyleElement.cpp

Issue 2837023005: Move MediaQuery classes off BlinkGC heap (Closed)
Patch Set: fix Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/StyleElement.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleElement.cpp b/third_party/WebKit/Source/core/dom/StyleElement.cpp
index 71e83c7fec41a48567f82da105124a27d989ef49..78a431c0445a327553379a36dff3474271b9d3cd 100644
--- a/third_party/WebKit/Source/core/dom/StyleElement.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleElement.cpp
@@ -152,11 +152,11 @@ StyleElement::ProcessingResult StyleElement::CreateSheet(Element& element,
// If type is empty or CSS, this is a CSS style sheet.
const AtomicString& type = this->type();
if (IsCSS(element, type) && passes_content_security_policy_checks) {
- MediaQuerySet* media_queries = MediaQuerySet::Create(media());
+ RefPtr<MediaQuerySet> media_queries = MediaQuerySet::Create(media());
MediaQueryEvaluator screen_eval("screen");
MediaQueryEvaluator print_eval("print");
- if (screen_eval.Eval(media_queries) || print_eval.Eval(media_queries)) {
+ if (screen_eval.Eval(*media_queries) || print_eval.Eval(*media_queries)) {
loading_ = true;
TextPosition start_position =
start_position_ == TextPosition::BelowRangePosition()

Powered by Google App Engine
This is Rietveld 408576698