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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 } | 634 } |
635 } | 635 } |
636 | 636 |
637 // USVString is identical to DOMString except that "convert a | 637 // USVString is identical to DOMString except that "convert a |
638 // DOMString to a sequence of Unicode characters" is used subsequently | 638 // DOMString to a sequence of Unicode characters" is used subsequently |
639 // when converting to an IDL value | 639 // when converting to an IDL value |
640 String x = toCoreString(stringObject); | 640 String x = toCoreString(stringObject); |
641 return replaceUnmatchedSurrogates(x); | 641 return replaceUnmatchedSurrogates(x); |
642 } | 642 } |
643 | 643 |
644 PassRefPtrWillBeRawPtr<XPathNSResolver> toXPathNSResolver(ScriptState* scriptSta
te, v8::Handle<v8::Value> value) | 644 XPathNSResolver* toXPathNSResolver(ScriptState* scriptState, v8::Handle<v8::Valu
e> value) |
645 { | 645 { |
646 RefPtrWillBeRawPtr<XPathNSResolver> resolver = nullptr; | 646 XPathNSResolver* resolver = nullptr; |
647 if (V8XPathNSResolver::hasInstance(value, scriptState->isolate())) | 647 if (V8XPathNSResolver::hasInstance(value, scriptState->isolate())) |
648 resolver = V8XPathNSResolver::toImpl(v8::Handle<v8::Object>::Cast(value)
); | 648 resolver = V8XPathNSResolver::toImpl(v8::Handle<v8::Object>::Cast(value)
); |
649 else if (value->IsObject()) | 649 else if (value->IsObject()) |
650 resolver = V8CustomXPathNSResolver::create(scriptState, value.As<v8::Obj
ect>()); | 650 resolver = V8CustomXPathNSResolver::create(scriptState, value.As<v8::Obj
ect>()); |
651 return resolver; | 651 return resolver; |
652 } | 652 } |
653 | 653 |
654 DOMWindow* toDOMWindow(v8::Isolate* isolate, v8::Handle<v8::Value> value) | 654 DOMWindow* toDOMWindow(v8::Isolate* isolate, v8::Handle<v8::Value> value) |
655 { | 655 { |
656 if (value.IsEmpty() || !value->IsObject()) | 656 if (value.IsEmpty() || !value->IsObject()) |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 v8::Local<v8::Value> data = info.Data(); | 987 v8::Local<v8::Value> data = info.Data(); |
988 ASSERT(data->IsExternal()); | 988 ASSERT(data->IsExternal()); |
989 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | 989 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
990 if (!perContextData) | 990 if (!perContextData) |
991 return; | 991 return; |
992 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | 992 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
993 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 993 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
994 } | 994 } |
995 | 995 |
996 } // namespace blink | 996 } // namespace blink |
OLD | NEW |