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

Side by Side Diff: fxjs/cfxjse_value.cpp

Issue 2380713005: Move fxjs/include to fxjs (Closed)
Patch Set: Rebase to master 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 | « fxjs/cfxjse_value.h ('k') | fxjs/fxjs_v8.h » ('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 "fxjs/include/cfxjse_value.h" 7 #include "fxjs/cfxjse_value.h"
8 8
9 #include <math.h> 9 #include <math.h>
10 10
11 #include "fxjs/include/cfxjse_class.h" 11 #include "fxjs/cfxjse_class.h"
12 #include "fxjs/include/cfxjse_context.h" 12 #include "fxjs/cfxjse_context.h"
13 13
14 namespace { 14 namespace {
15 15
16 double ftod(FX_FLOAT fNumber) { 16 double ftod(FX_FLOAT fNumber) {
17 static_assert(sizeof(FX_FLOAT) == 4, "FX_FLOAT of incorrect size"); 17 static_assert(sizeof(FX_FLOAT) == 4, "FX_FLOAT of incorrect size");
18 18
19 uint32_t nFloatBits = (uint32_t&)fNumber; 19 uint32_t nFloatBits = (uint32_t&)fNumber;
20 uint8_t nExponent = (uint8_t)(nFloatBits >> 23); 20 uint8_t nExponent = (uint8_t)(nFloatBits >> 23);
21 if (nExponent == 0 || nExponent == 255) 21 if (nExponent == 0 || nExponent == 255)
22 return fNumber; 22 return fNumber;
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 m_pIsolate, reinterpret_cast<const char*>(szString.raw_str()), 510 m_pIsolate, reinterpret_cast<const char*>(szString.raw_str()),
511 v8::String::kNormalString, szString.GetLength()); 511 v8::String::kNormalString, szString.GetLength());
512 m_hValue.Reset(m_pIsolate, hValue); 512 m_hValue.Reset(m_pIsolate, hValue);
513 } 513 }
514 514
515 void CFXJSE_Value::SetJSObject() { 515 void CFXJSE_Value::SetJSObject() {
516 CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate); 516 CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
517 v8::Local<v8::Value> hValue = v8::Object::New(m_pIsolate); 517 v8::Local<v8::Value> hValue = v8::Object::New(m_pIsolate);
518 m_hValue.Reset(m_pIsolate, hValue); 518 m_hValue.Reset(m_pIsolate, hValue);
519 } 519 }
OLDNEW
« no previous file with comments | « fxjs/cfxjse_value.h ('k') | fxjs/fxjs_v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698