| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 // Does the value convert to nan or to an infinity? | 436 // Does the value convert to nan or to an infinity? |
| 437 if (std::isnan(x) || std::isinf(x)) | 437 if (std::isnan(x) || std::isinf(x)) |
| 438 return 0; | 438 return 0; |
| 439 | 439 |
| 440 // NaNs and +/-Infinity should be 0, otherwise modulo 2^64. | 440 // NaNs and +/-Infinity should be 0, otherwise modulo 2^64. |
| 441 unsigned long long integer; | 441 unsigned long long integer; |
| 442 doubleToInteger(x, integer); | 442 doubleToInteger(x, integer); |
| 443 return integer; | 443 return integer; |
| 444 } | 444 } |
| 445 | 445 |
| 446 v8::Handle<v8::FunctionTemplate> createRawTemplate(v8::Isolate* isolate) | |
| 447 { | |
| 448 v8::EscapableHandleScope scope(isolate); | |
| 449 v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New(isolate,
V8ObjectConstructor::isValidConstructorMode); | |
| 450 return scope.Escape(result); | |
| 451 } | |
| 452 | |
| 453 PassRefPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value> value, v8::I
solate* isolate) | 446 PassRefPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value> value, v8::I
solate* isolate) |
| 454 { | 447 { |
| 455 RefPtr<XPathNSResolver> resolver; | 448 RefPtr<XPathNSResolver> resolver; |
| 456 if (V8XPathNSResolver::hasInstance(value, isolate, worldType(isolate))) | 449 if (V8XPathNSResolver::hasInstance(value, isolate, worldType(isolate))) |
| 457 resolver = V8XPathNSResolver::toNative(v8::Handle<v8::Object>::Cast(valu
e)); | 450 resolver = V8XPathNSResolver::toNative(v8::Handle<v8::Object>::Cast(valu
e)); |
| 458 else if (value->IsObject()) | 451 else if (value->IsObject()) |
| 459 resolver = V8CustomXPathNSResolver::create(value->ToObject(), isolate); | 452 resolver = V8CustomXPathNSResolver::create(value->ToObject(), isolate); |
| 460 return resolver; | 453 return resolver; |
| 461 } | 454 } |
| 462 | 455 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 return mainThreadIsolate(); | 644 return mainThreadIsolate(); |
| 652 return v8::Isolate::GetCurrent(); | 645 return v8::Isolate::GetCurrent(); |
| 653 } | 646 } |
| 654 | 647 |
| 655 v8::Isolate* toIsolate(Frame* frame) | 648 v8::Isolate* toIsolate(Frame* frame) |
| 656 { | 649 { |
| 657 return frame->script().isolate(); | 650 return frame->script().isolate(); |
| 658 } | 651 } |
| 659 | 652 |
| 660 } // namespace WebCore | 653 } // namespace WebCore |
| OLD | NEW |