| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Collabora Ltd. | 3 * Copyright (C) 2008 Collabora Ltd. |
| 4 * Copyright (C) 2011 Peter Varga (pvarga@webkit.org), University of Szeged | 4 * Copyright (C) 2011 Peter Varga (pvarga@webkit.org), University of Szeged |
| 5 * Copyright (C) 2013 Google Inc. All rights reserved. | 5 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 24 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "bindings/core/v8/ScriptRegexp.h" | 29 #include "bindings/core/v8/ScriptRegexp.h" |
| 30 | 30 |
| 31 #include "bindings/core/v8/V8BindingForCore.h" | 31 #include "bindings/core/v8/V8BindingForCore.h" |
| 32 #include "bindings/core/v8/V8PerIsolateData.h" | |
| 33 #include "bindings/core/v8/V8ScriptRunner.h" | 32 #include "bindings/core/v8/V8ScriptRunner.h" |
| 34 #include "platform/ScriptForbiddenScope.h" | 33 #include "platform/ScriptForbiddenScope.h" |
| 34 #include "platform/bindings/V8PerIsolateData.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 ScriptRegexp::ScriptRegexp(const String& pattern, | 38 ScriptRegexp::ScriptRegexp(const String& pattern, |
| 39 TextCaseSensitivity case_sensitivity, | 39 TextCaseSensitivity case_sensitivity, |
| 40 MultilineMode multiline_mode, | 40 MultilineMode multiline_mode, |
| 41 CharacterMode char_mode) { | 41 CharacterMode char_mode) { |
| 42 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 42 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
| 43 v8::HandleScope handle_scope(isolate); | 43 v8::HandleScope handle_scope(isolate); |
| 44 v8::Local<v8::Context> context = | 44 v8::Local<v8::Context> context = |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 v8::Local<v8::Value> match; | 119 v8::Local<v8::Value> match; |
| 120 if (!result->Get(context, 0).ToLocal(&match)) | 120 if (!result->Get(context, 0).ToLocal(&match)) |
| 121 return -1; | 121 return -1; |
| 122 *match_length = match.As<v8::String>()->Length(); | 122 *match_length = match.As<v8::String>()->Length(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 return match_offset.As<v8::Int32>()->Value() + start_from; | 125 return match_offset.As<v8::Int32>()->Value() + start_from; |
| 126 } | 126 } |
| 127 | 127 |
| 128 } // namespace blink | 128 } // namespace blink |
| OLD | NEW |