| 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 } | 453 } |
| 454 | 454 |
| 455 float toFloat(v8::Handle<v8::Value> value, ExceptionState& exceptionState) | 455 float toFloat(v8::Handle<v8::Value> value, ExceptionState& exceptionState) |
| 456 { | 456 { |
| 457 V8TRYCATCH_EXCEPTION_RETURN(v8::Local<v8::Number>, numberObject, value->ToNu
mber(), exceptionState, 0); | 457 V8TRYCATCH_EXCEPTION_RETURN(v8::Local<v8::Number>, numberObject, value->ToNu
mber(), exceptionState, 0); |
| 458 return numberObject->NumberValue(); | 458 return numberObject->NumberValue(); |
| 459 } | 459 } |
| 460 | 460 |
| 461 PassRefPtrWillBeRawPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value>
value, v8::Isolate* isolate) | 461 PassRefPtrWillBeRawPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value>
value, v8::Isolate* isolate) |
| 462 { | 462 { |
| 463 RefPtrWillBeRawPtr<XPathNSResolver> resolver; | 463 RefPtrWillBeRawPtr<XPathNSResolver> resolver = nullptr; |
| 464 if (V8XPathNSResolver::hasInstance(value, isolate)) | 464 if (V8XPathNSResolver::hasInstance(value, isolate)) |
| 465 resolver = V8XPathNSResolver::toNative(v8::Handle<v8::Object>::Cast(valu
e)); | 465 resolver = V8XPathNSResolver::toNative(v8::Handle<v8::Object>::Cast(valu
e)); |
| 466 else if (value->IsObject()) | 466 else if (value->IsObject()) |
| 467 resolver = V8CustomXPathNSResolver::create(value->ToObject(), isolate); | 467 resolver = V8CustomXPathNSResolver::create(value->ToObject(), isolate); |
| 468 return resolver; | 468 return resolver; |
| 469 } | 469 } |
| 470 | 470 |
| 471 DOMWindow* toDOMWindow(v8::Handle<v8::Value> value, v8::Isolate* isolate) | 471 DOMWindow* toDOMWindow(v8::Handle<v8::Value> value, v8::Isolate* isolate) |
| 472 { | 472 { |
| 473 if (value.IsEmpty() || !value->IsObject()) | 473 if (value.IsEmpty() || !value->IsObject()) |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 V8ExecutionScope::V8ExecutionScope(v8::Isolate* isolate) | 657 V8ExecutionScope::V8ExecutionScope(v8::Isolate* isolate) |
| 658 : m_handleScope(isolate) | 658 : m_handleScope(isolate) |
| 659 , m_context(v8::Context::New(isolate)) | 659 , m_context(v8::Context::New(isolate)) |
| 660 , m_contextScope(m_context) | 660 , m_contextScope(m_context) |
| 661 , m_world(DOMWrapperWorld::create()) | 661 , m_world(DOMWrapperWorld::create()) |
| 662 , m_perContextData(V8PerContextData::create(m_context, m_world)) | 662 , m_perContextData(V8PerContextData::create(m_context, m_world)) |
| 663 { | 663 { |
| 664 } | 664 } |
| 665 | 665 |
| 666 } // namespace WebCore | 666 } // namespace WebCore |
| OLD | NEW |