From 90a4181194dd8eca153cf2a101ec27e382b27a58 Mon Sep 17 00:00:00 2001 From: Jochen Eisinger Date: Wed, 20 May 2015 10:49:45 +0200 Subject: Fix compilation on xfa branch and turn on v8 deprecation warnings R=vogelheim@chromium.org BUG= Review URL: https://codereview.chromium.org/1142293003 --- BUILD.gn | 1 + build/standalone.gypi | 6 +++++- xfa/src/fxjse/src/dynprop.cpp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 1dedaae522..22b09608cd 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -22,6 +22,7 @@ config("pdfium_config") { "PNG_PREFIX", "PNGPREFIX_H", "PNG_USE_READ_MACROS", + "V8_DEPRECATION_WARNINGS", ] if (pdf_use_skia) { diff --git a/build/standalone.gypi b/build/standalone.gypi index 87fe3445ab..a8818db720 100644 --- a/build/standalone.gypi +++ b/build/standalone.gypi @@ -157,6 +157,10 @@ 'ldflags': [ '-pthread', ], + 'defines': [ + # Don't use deprecated V8 APIs anywhere. + 'V8_DEPRECATION_WARNINGS', + ], 'msvs_cygwin_dirs': ['<(DEPTH)/v8/third_party/cygwin'], 'msvs_configuration_attributes': { 'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)', @@ -279,4 +283,4 @@ # See comment in Chromium's common.gypi for why this is needed. 'SYMROOT': '<(DEPTH)/xcodebuild', } -} \ No newline at end of file +} diff --git a/xfa/src/fxjse/src/dynprop.cpp b/xfa/src/fxjse/src/dynprop.cpp index ddc3e20054..3fc6c494eb 100644 --- a/xfa/src/fxjse/src/dynprop.cpp +++ b/xfa/src/fxjse/src/dynprop.cpp @@ -258,7 +258,7 @@ void CFXJSE_Class::SetUpDynPropHandler(CFXJSE_Context* pContext, CFXJSE_Value* p v8::Isolate* pIsolate = pValue->GetIsolate(); CFXJSE_ScopeUtil_IsolateHandleRootOrNormalContext scope(pIsolate, pContext); v8::Local hContext = v8::Local::New(pIsolate, pContext ? pContext->m_hContext : CFXJSE_RuntimeData::Get(pIsolate)->m_hRootContext); - v8::Local hObject = v8::Local::New(pIsolate, pValue->m_hValue.As()); + v8::Local hObject = v8::Local::New(pIsolate, pValue->m_hValue).As(); v8::Local hHarmonyProxyObj = hContext->Global()->Get(v8::String::NewFromUtf8(pIsolate, "Proxy")).As(); v8::Local hHarmonyProxyCreateFn = hHarmonyProxyObj->Get(v8::String::NewFromUtf8(pIsolate, "create")).As(); v8::Local hOldPrototype = hObject->GetPrototype(); -- cgit v1.2.3