OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 exceptionState); | 99 exceptionState); |
100 | 100 |
101 v8SetReturnValue(info, info.Holder()); | 101 v8SetReturnValue(info, info.Holder()); |
102 } | 102 } |
103 | 103 |
104 void V8Document::createTouchMethodPrologueCustom( | 104 void V8Document::createTouchMethodPrologueCustom( |
105 const v8::FunctionCallbackInfo<v8::Value>& info, | 105 const v8::FunctionCallbackInfo<v8::Value>& info, |
106 Document*) { | 106 Document*) { |
107 v8::Local<v8::Value> v8Window = info[0]; | 107 v8::Local<v8::Value> v8Window = info[0]; |
108 if (isUndefinedOrNull(v8Window)) { | 108 if (isUndefinedOrNull(v8Window)) { |
109 UseCounter::countIfNotPrivateScript( | 109 UseCounter::count(currentExecutionContext(info.GetIsolate()), |
110 info.GetIsolate(), currentExecutionContext(info.GetIsolate()), | 110 UseCounter::DocumentCreateTouchWindowNull); |
111 UseCounter::DocumentCreateTouchWindowNull); | |
112 } else if (!toDOMWindow(info.GetIsolate(), v8Window)) { | 111 } else if (!toDOMWindow(info.GetIsolate(), v8Window)) { |
113 UseCounter::countIfNotPrivateScript( | 112 UseCounter::count(currentExecutionContext(info.GetIsolate()), |
114 info.GetIsolate(), currentExecutionContext(info.GetIsolate()), | 113 UseCounter::DocumentCreateTouchWindowWrongType); |
115 UseCounter::DocumentCreateTouchWindowWrongType); | |
116 } | 114 } |
117 | 115 |
118 v8::Local<v8::Value> v8Target = info[1]; | 116 v8::Local<v8::Value> v8Target = info[1]; |
119 if (isUndefinedOrNull(v8Target)) { | 117 if (isUndefinedOrNull(v8Target)) { |
120 UseCounter::countIfNotPrivateScript( | 118 UseCounter::count(currentExecutionContext(info.GetIsolate()), |
121 info.GetIsolate(), currentExecutionContext(info.GetIsolate()), | 119 UseCounter::DocumentCreateTouchTargetNull); |
122 UseCounter::DocumentCreateTouchTargetNull); | |
123 } else if (!toEventTarget(info.GetIsolate(), v8Target)) { | 120 } else if (!toEventTarget(info.GetIsolate(), v8Target)) { |
124 UseCounter::countIfNotPrivateScript( | 121 UseCounter::count(currentExecutionContext(info.GetIsolate()), |
125 info.GetIsolate(), currentExecutionContext(info.GetIsolate()), | 122 UseCounter::DocumentCreateTouchTargetWrongType); |
126 UseCounter::DocumentCreateTouchTargetWrongType); | |
127 } | 123 } |
128 | 124 |
129 if (info.Length() < 7) { | 125 if (info.Length() < 7) { |
130 UseCounter::countIfNotPrivateScript( | 126 UseCounter::count(currentExecutionContext(info.GetIsolate()), |
131 info.GetIsolate(), currentExecutionContext(info.GetIsolate()), | 127 UseCounter::DocumentCreateTouchLessThanSevenArguments); |
132 UseCounter::DocumentCreateTouchLessThanSevenArguments); | |
133 } | 128 } |
134 } | 129 } |
135 | 130 |
136 } // namespace blink | 131 } // namespace blink |
OLD | NEW |