Fix compilation on xfa branch and turn on v8 deprecation warnings
authorJochen Eisinger <jochen@chromium.org>
Wed, 20 May 2015 08:49:45 +0000 (10:49 +0200)
committerJochen Eisinger <jochen@chromium.org>
Wed, 20 May 2015 08:49:45 +0000 (10:49 +0200)
R=vogelheim@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1142293003

BUILD.gn
build/standalone.gypi
xfa/src/fxjse/src/dynprop.cpp

index 1dedaae..22b0960 100644 (file)
--- 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) {
index 87fe344..a8818db 100644 (file)
     '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)',
     # See comment in Chromium's common.gypi for why this is needed.
     'SYMROOT': '<(DEPTH)/xcodebuild',
   }
-}
\ No newline at end of file
+}
index ddc3e20..3fc6c49 100644 (file)
@@ -258,7 +258,7 @@ void CFXJSE_Class::SetUpDynPropHandler(CFXJSE_Context* pContext, CFXJSE_Value* p
     v8::Isolate* pIsolate = pValue->GetIsolate();\r
     CFXJSE_ScopeUtil_IsolateHandleRootOrNormalContext scope(pIsolate, pContext);\r
     v8::Local<v8::Context> hContext = v8::Local<v8::Context>::New(pIsolate, pContext ? pContext->m_hContext : CFXJSE_RuntimeData::Get(pIsolate)->m_hRootContext);\r
-    v8::Local<v8::Object> hObject = v8::Local<v8::Object>::New(pIsolate, pValue->m_hValue.As<v8::Object>());\r
+    v8::Local<v8::Object> hObject = v8::Local<v8::Value>::New(pIsolate, pValue->m_hValue).As<v8::Object>();\r
     v8::Local<v8::Object> hHarmonyProxyObj =  hContext->Global()->Get(v8::String::NewFromUtf8(pIsolate, "Proxy")).As<v8::Object>();\r
     v8::Local<v8::Function> hHarmonyProxyCreateFn = hHarmonyProxyObj->Get(v8::String::NewFromUtf8(pIsolate, "create")).As<v8::Function>();\r
     v8::Local<v8::Value> hOldPrototype = hObject->GetPrototype();\r