| OLD | NEW |
| 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 "xfa/fxjse/value.h" | 7 #include "fxjse/include/cfxjse_value.h" |
| 8 | 8 |
| 9 #include <math.h> | 9 #include <math.h> |
| 10 | 10 |
| 11 #include "xfa/fxjse/class.h" | 11 #include "fxjse/context.h" |
| 12 #include "xfa/fxjse/context.h" | 12 #include "fxjse/include/cfxjse_class.h" |
| 13 | 13 |
| 14 void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Message) { | 14 void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Message) { |
| 15 v8::Isolate* pIsolate = v8::Isolate::GetCurrent(); | 15 v8::Isolate* pIsolate = v8::Isolate::GetCurrent(); |
| 16 ASSERT(pIsolate); | 16 ASSERT(pIsolate); |
| 17 | 17 |
| 18 CFXJSE_ScopeUtil_IsolateHandleRootContext scope(pIsolate); | 18 CFXJSE_ScopeUtil_IsolateHandleRootContext scope(pIsolate); |
| 19 v8::Local<v8::String> hMessage = v8::String::NewFromUtf8( | 19 v8::Local<v8::String> hMessage = v8::String::NewFromUtf8( |
| 20 pIsolate, utf8Message.c_str(), v8::String::kNormalString, | 20 pIsolate, utf8Message.c_str(), v8::String::kNormalString, |
| 21 utf8Message.GetLength()); | 21 utf8Message.GetLength()); |
| 22 v8::Local<v8::Value> hError = v8::Exception::Error(hMessage); | 22 v8::Local<v8::Value> hError = v8::Exception::Error(hMessage); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 if (lpRetValue) | 288 if (lpRetValue) |
| 289 lpRetValue->ForceSetValue(hReturnValue); | 289 lpRetValue->ForceSetValue(hReturnValue); |
| 290 | 290 |
| 291 if (lpLocalArgs) { | 291 if (lpLocalArgs) { |
| 292 for (uint32_t i = 0; i < nArgCount; i++) | 292 for (uint32_t i = 0; i < nArgCount; i++) |
| 293 lpLocalArgs[i].~Local(); | 293 lpLocalArgs[i].~Local(); |
| 294 FX_Free(lpLocalArgs); | 294 FX_Free(lpLocalArgs); |
| 295 } | 295 } |
| 296 return bRetValue; | 296 return bRetValue; |
| 297 } | 297 } |
| OLD | NEW |