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

Side by Side Diff: components/pdf/renderer/pepper_pdf_host.cc

Issue 2148063002: Add some CHECKs to PepperPDFHost to figure out a crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years, 5 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 | « no previous file | 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/pdf/renderer/pepper_pdf_host.h" 5 #include "components/pdf/renderer/pepper_pdf_host.h"
6 6
7 #include "components/pdf/common/pdf_messages.h" 7 #include "components/pdf/common/pdf_messages.h"
8 #include "components/pdf/renderer/pdf_accessibility_tree.h" 8 #include "components/pdf/renderer/pdf_accessibility_tree.h"
9 #include "content/public/common/referrer.h" 9 #include "content/public/common/referrer.h"
10 #include "content/public/renderer/pepper_plugin_instance.h" 10 #include "content/public/renderer/pepper_plugin_instance.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 return PP_OK; 135 return PP_OK;
136 } 136 }
137 137
138 int32_t PepperPDFHost::OnHostMsgHasUnsupportedFeature( 138 int32_t PepperPDFHost::OnHostMsgHasUnsupportedFeature(
139 ppapi::host::HostMessageContext* context) { 139 ppapi::host::HostMessageContext* context) {
140 content::PepperPluginInstance* instance = 140 content::PepperPluginInstance* instance =
141 host_->GetPluginInstance(pp_instance()); 141 host_->GetPluginInstance(pp_instance());
142 if (!instance) 142 if (!instance)
143 return PP_ERROR_FAILED; 143 return PP_ERROR_FAILED;
144 144
145 // TODO(thestig): Turn CHECKs into the proper if statement after figuring out
146 // what's wrong for https://crbug.com/627814
147 CHECK(instance->GetContainer());
148 CHECK(instance->GetContainer()->document().frame());
149 CHECK(instance->GetContainer()->document().frame()->view());
145 blink::WebView* view = 150 blink::WebView* view =
146 instance->GetContainer()->document().frame()->view(); 151 instance->GetContainer()->document().frame()->view();
147 content::RenderView* render_view = content::RenderView::FromWebView(view); 152 content::RenderView* render_view = content::RenderView::FromWebView(view);
148 render_view->Send( 153 render_view->Send(
149 new PDFHostMsg_PDFHasUnsupportedFeature(render_view->GetRoutingID())); 154 new PDFHostMsg_PDFHasUnsupportedFeature(render_view->GetRoutingID()));
150 return PP_OK; 155 return PP_OK;
151 } 156 }
152 157
153 int32_t PepperPDFHost::OnHostMsgPrint( 158 int32_t PepperPDFHost::OnHostMsgPrint(
154 ppapi::host::HostMessageContext* context) { 159 ppapi::host::HostMessageContext* context) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 240
236 void PepperPDFHost::CreatePdfAccessibilityTreeIfNeeded( 241 void PepperPDFHost::CreatePdfAccessibilityTreeIfNeeded(
237 content::PepperPluginInstance* instance) { 242 content::PepperPluginInstance* instance) {
238 if (!pdf_accessibility_tree_) { 243 if (!pdf_accessibility_tree_) {
239 pdf_accessibility_tree_.reset( 244 pdf_accessibility_tree_.reset(
240 new PdfAccessibilityTree(instance->GetRenderView())); 245 new PdfAccessibilityTree(instance->GetRenderView()));
241 } 246 }
242 } 247 }
243 248
244 } // namespace pdf 249 } // namespace pdf
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698