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

Side by Side Diff: fpdfsdk/src/javascript/JS_Runtime.cpp

Issue 1138823004: Replace v8::Handle with v8::Local and v8::Persistent with v8::Global (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 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
« no previous file with comments | « fpdfsdk/src/javascript/Document.cpp ('k') | fpdfsdk/src/javascript/JS_Value.cpp » ('j') | 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 PDFium Authors. All rights reserved. 1 // Copyright 2014 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../include/javascript/JavaScript.h" 7 #include "../../include/javascript/JavaScript.h"
8 #include "../../include/javascript/IJavaScript.h" 8 #include "../../include/javascript/IJavaScript.h"
9 #include "../../include/javascript/JS_EventHandler.h" 9 #include "../../include/javascript/JS_EventHandler.h"
10 #include "../../include/javascript/JS_Runtime.h" 10 #include "../../include/javascript/JS_Runtime.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 m_context.Reset(); 142 m_context.Reset();
143 143
144 //m_isolate->Exit(); 144 //m_isolate->Exit();
145 m_isolate->Dispose(); 145 m_isolate->Dispose();
146 } 146 }
147 147
148 FX_BOOL CJS_Runtime::InitJSObjects() 148 FX_BOOL CJS_Runtime::InitJSObjects()
149 { 149 {
150 v8::Isolate::Scope isolate_scope(GetIsolate()); 150 v8::Isolate::Scope isolate_scope(GetIsolate());
151 v8::HandleScope handle_scope(GetIsolate()); 151 v8::HandleScope handle_scope(GetIsolate());
152 » v8::Handle<v8::Context> context = v8::Context::New(GetIsolate()); 152 » v8::Local<v8::Context> context = v8::Context::New(GetIsolate());
153 v8::Context::Scope context_scope(context); 153 v8::Context::Scope context_scope(context);
154 //0 - 8 154 //0 - 8
155 if (CJS_Border::Init(*this, JS_STATIC) < 0) return FALSE; 155 if (CJS_Border::Init(*this, JS_STATIC) < 0) return FALSE;
156 if (CJS_Display::Init(*this, JS_STATIC) < 0) return FALSE; 156 if (CJS_Display::Init(*this, JS_STATIC) < 0) return FALSE;
157 if (CJS_Font::Init(*this, JS_STATIC) < 0) return FALSE; 157 if (CJS_Font::Init(*this, JS_STATIC) < 0) return FALSE;
158 if (CJS_Highlight::Init(*this, JS_STATIC) < 0) return FALSE; 158 if (CJS_Highlight::Init(*this, JS_STATIC) < 0) return FALSE;
159 if (CJS_Position::Init(*this, JS_STATIC) < 0) return FALSE; 159 if (CJS_Position::Init(*this, JS_STATIC) < 0) return FALSE;
160 if (CJS_ScaleHow::Init(*this, JS_STATIC) < 0) return FALSE; 160 if (CJS_ScaleHow::Init(*this, JS_STATIC) < 0) return FALSE;
161 if (CJS_ScaleWhen::Init(*this, JS_STATIC) < 0) return FALSE; 161 if (CJS_ScaleWhen::Init(*this, JS_STATIC) < 0) return FALSE;
162 if (CJS_Style::Init(*this, JS_STATIC) < 0) return FALSE; 162 if (CJS_Style::Init(*this, JS_STATIC) < 0) return FALSE;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 while (p) 322 while (p)
323 { 323 {
324 CJS_FieldEvent* pOld = p; 324 CJS_FieldEvent* pOld = p;
325 p = pOld->pNext; 325 p = pOld->pNext;
326 326
327 delete pOld; 327 delete pOld;
328 } 328 }
329 } 329 }
330 330
331 v8::Handle<v8::Context>»CJS_Runtime::NewJSContext() 331 v8::Local<v8::Context>» CJS_Runtime::NewJSContext()
332 { 332 {
333 return v8::Local<v8::Context>::New(m_isolate, m_context); 333 return v8::Local<v8::Context>::New(m_isolate, m_context);
334 } 334 }
335 335
336 CFX_WideString ChangeObjName(const CFX_WideString& str) 336 CFX_WideString ChangeObjName(const CFX_WideString& str)
337 { 337 {
338 CFX_WideString sRet = str; 338 CFX_WideString sRet = str;
339 sRet.Replace(L"_", L"."); 339 sRet.Replace(L"_", L".");
340 return sRet; 340 return sRet;
341 } 341 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/Document.cpp ('k') | fpdfsdk/src/javascript/JS_Value.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698