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

Side by Side Diff: testing/embedder_test.cpp

Issue 2398063002: Fixup MSan embeddertests (Closed)
Patch Set: Created 4 years, 2 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 | « fpdfsdk/fpdfxfa/cpdfxfa_document.cpp ('k') | 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 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 PDFium 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 "testing/embedder_test.h" 5 #include "testing/embedder_test.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 8
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 UNSUPPORT_INFO* info = static_cast<UNSUPPORT_INFO*>(this); 92 UNSUPPORT_INFO* info = static_cast<UNSUPPORT_INFO*>(this);
93 memset(info, 0, sizeof(UNSUPPORT_INFO)); 93 memset(info, 0, sizeof(UNSUPPORT_INFO));
94 info->version = 1; 94 info->version = 1;
95 info->FSDK_UnSupport_Handler = UnsupportedHandlerTrampoline; 95 info->FSDK_UnSupport_Handler = UnsupportedHandlerTrampoline;
96 FSDK_SetUnSpObjProcessHandler(info); 96 FSDK_SetUnSpObjProcessHandler(info);
97 } 97 }
98 98
99 void EmbedderTest::TearDown() { 99 void EmbedderTest::TearDown() {
100 if (document_) { 100 if (document_) {
101 FORM_DoDocumentAAction(form_handle_, FPDFDOC_AACTION_WC); 101 FORM_DoDocumentAAction(form_handle_, FPDFDOC_AACTION_WC);
102 #ifdef PDF_ENABLE_XFA
103 // Note: The shut down order here is the reverse of the non-XFA branch
104 // order. Need to work out if this is required, and if it is, the lifetimes
105 // of objects owned by |doc| that |form| reference.
106 FPDF_CloseDocument(document_);
107 FPDFDOC_ExitFormFillEnvironment(form_handle_);
108 #else // PDF_ENABLE_XFA
109 FPDFDOC_ExitFormFillEnvironment(form_handle_); 102 FPDFDOC_ExitFormFillEnvironment(form_handle_);
110 FPDF_CloseDocument(document_); 103 FPDF_CloseDocument(document_);
111 #endif // PDF_ENABLE_XFA
112 } 104 }
113 105
114 FPDFAvail_Destroy(avail_); 106 FPDFAvail_Destroy(avail_);
115 FPDF_DestroyLibrary(); 107 FPDF_DestroyLibrary();
116 108
117 delete loader_; 109 delete loader_;
118 } 110 }
119 111
120 bool EmbedderTest::CreateEmptyDocument() { 112 bool EmbedderTest::CreateEmptyDocument() {
121 document_ = FPDF_CreateNewDocument(); 113 document_ = FPDF_CreateNewDocument();
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 335 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
344 if (g_v8_natives) 336 if (g_v8_natives)
345 free(const_cast<char*>(g_v8_natives->data)); 337 free(const_cast<char*>(g_v8_natives->data));
346 if (g_v8_snapshot) 338 if (g_v8_snapshot)
347 free(const_cast<char*>(g_v8_snapshot->data)); 339 free(const_cast<char*>(g_v8_snapshot->data));
348 #endif // V8_USE_EXTERNAL_STARTUP_DATA 340 #endif // V8_USE_EXTERNAL_STARTUP_DATA
349 #endif // PDF_ENABLE_V8 341 #endif // PDF_ENABLE_V8
350 342
351 return ret_val; 343 return ret_val;
352 } 344 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfxfa/cpdfxfa_document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698