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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 #include "wtf/unicode/CharacterNames.h" | 72 #include "wtf/unicode/CharacterNames.h" |
73 #include "wtf/unicode/Unicode.h" | 73 #include "wtf/unicode/Unicode.h" |
74 | 74 |
75 namespace blink { | 75 namespace blink { |
76 | 76 |
77 namespace { | 77 namespace { |
78 | 78 |
79 template<class Callback> | 79 template<class Callback> |
80 void v8ConstructorAttributeGetter(const Callback& info) | 80 void v8ConstructorAttributeGetter(const Callback& info) |
81 { | 81 { |
| 82 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
82 v8::Local<v8::Value> data = info.Data(); | 83 v8::Local<v8::Value> data = info.Data(); |
83 ASSERT(data->IsExternal()); | 84 ASSERT(data->IsExternal()); |
84 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | 85 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
85 if (!perContextData) | 86 if (!perContextData) |
86 return; | 87 return; |
87 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | 88 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
| 89 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
88 } | 90 } |
89 | 91 |
90 } // namespace | 92 } // namespace |
91 | 93 |
92 void setArityTypeError(ExceptionState& exceptionState, const char* valid, unsign
ed provided) | 94 void setArityTypeError(ExceptionState& exceptionState, const char* valid, unsign
ed provided) |
93 { | 95 { |
94 exceptionState.throwTypeError(ExceptionMessages::invalidArity(valid, provide
d)); | 96 exceptionState.throwTypeError(ExceptionMessages::invalidArity(valid, provide
d)); |
95 } | 97 } |
96 | 98 |
97 v8::Local<v8::Value> createMinimumArityTypeErrorForMethod(v8::Isolate* isolate,
const char* method, const char* type, unsigned expected, unsigned provided) | 99 v8::Local<v8::Value> createMinimumArityTypeErrorForMethod(v8::Isolate* isolate,
const char* method, const char* type, unsigned expected, unsigned provided) |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 { | 1061 { |
1060 v8ConstructorAttributeGetter(info); | 1062 v8ConstructorAttributeGetter(info); |
1061 } | 1063 } |
1062 | 1064 |
1063 void v8ConstructorAttributeGetterAsAccessor(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 1065 void v8ConstructorAttributeGetterAsAccessor(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
1064 { | 1066 { |
1065 v8ConstructorAttributeGetter(info); | 1067 v8ConstructorAttributeGetter(info); |
1066 } | 1068 } |
1067 | 1069 |
1068 } // namespace blink | 1070 } // namespace blink |
OLD | NEW |