| 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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 | 477 |
| 478 float toFloat(v8::Handle<v8::Value> value, ExceptionState& exceptionState) | 478 float toFloat(v8::Handle<v8::Value> value, ExceptionState& exceptionState) |
| 479 { | 479 { |
| 480 V8TRYCATCH_EXCEPTION_RETURN(v8::Local<v8::Number>, numberObject, value->ToNu
mber(), exceptionState, 0); | 480 V8TRYCATCH_EXCEPTION_RETURN(v8::Local<v8::Number>, numberObject, value->ToNu
mber(), exceptionState, 0); |
| 481 return numberObject->NumberValue(); | 481 return numberObject->NumberValue(); |
| 482 } | 482 } |
| 483 | 483 |
| 484 PassRefPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value> value, v8::I
solate* isolate) | 484 PassRefPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value> value, v8::I
solate* isolate) |
| 485 { | 485 { |
| 486 RefPtr<XPathNSResolver> resolver; | 486 RefPtr<XPathNSResolver> resolver; |
| 487 if (V8XPathNSResolver::hasInstance(value, isolate, worldType(isolate))) | 487 if (V8XPathNSResolver::hasInstance(value, isolate)) |
| 488 resolver = V8XPathNSResolver::toNative(v8::Handle<v8::Object>::Cast(valu
e)); | 488 resolver = V8XPathNSResolver::toNative(v8::Handle<v8::Object>::Cast(valu
e)); |
| 489 else if (value->IsObject()) | 489 else if (value->IsObject()) |
| 490 resolver = V8CustomXPathNSResolver::create(value->ToObject(), isolate); | 490 resolver = V8CustomXPathNSResolver::create(value->ToObject(), isolate); |
| 491 return resolver; | 491 return resolver; |
| 492 } | 492 } |
| 493 | 493 |
| 494 v8::Handle<v8::Object> toInnerGlobalObject(v8::Handle<v8::Context> context) | 494 v8::Handle<v8::Object> toInnerGlobalObject(v8::Handle<v8::Context> context) |
| 495 { | 495 { |
| 496 return v8::Handle<v8::Object>::Cast(context->Global()->GetPrototype()); | 496 return v8::Handle<v8::Object>::Cast(context->Global()->GetPrototype()); |
| 497 } | 497 } |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 return mainThreadIsolate(); | 682 return mainThreadIsolate(); |
| 683 return v8::Isolate::GetCurrent(); | 683 return v8::Isolate::GetCurrent(); |
| 684 } | 684 } |
| 685 | 685 |
| 686 v8::Isolate* toIsolate(Frame* frame) | 686 v8::Isolate* toIsolate(Frame* frame) |
| 687 { | 687 { |
| 688 return frame->script().isolate(); | 688 return frame->script().isolate(); |
| 689 } | 689 } |
| 690 | 690 |
| 691 } // namespace WebCore | 691 } // namespace WebCore |
| OLD | NEW |