Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: src/jsregexp.cc

Issue 3788008: [Isolates] Fix auto extraction of isolate from heap objects in handle constructor. (Closed)
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/isolate.h ('k') | src/runtime.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 92
93 static inline void ThrowRegExpException(Handle<JSRegExp> re, 93 static inline void ThrowRegExpException(Handle<JSRegExp> re,
94 Handle<String> pattern, 94 Handle<String> pattern,
95 Handle<String> error_text, 95 Handle<String> error_text,
96 const char* message) { 96 const char* message) {
97 Isolate* isolate = re->GetIsolate(); 97 Isolate* isolate = re->GetIsolate();
98 Handle<JSArray> array = isolate->factory()->NewJSArray(2); 98 Handle<JSArray> array = isolate->factory()->NewJSArray(2);
99 SetElement(array, 0, pattern); 99 SetElement(array, 0, pattern);
100 SetElement(array, 1, error_text); 100 SetElement(array, 1, error_text);
101 Handle<Object> regexp_err = isolate->factory()->NewSyntaxError(message, array) ; 101 Handle<Object> regexp_err = isolate->factory()->NewSyntaxError(message,
102 array);
102 isolate->Throw(*regexp_err); 103 isolate->Throw(*regexp_err);
103 } 104 }
104 105
105 106
106 // Generic RegExp methods. Dispatches to implementation specific methods. 107 // Generic RegExp methods. Dispatches to implementation specific methods.
107 108
108 109
109 Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re, 110 Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re,
110 Handle<String> pattern, 111 Handle<String> pattern,
111 Handle<String> flag_str) { 112 Handle<String> flag_str) {
(...skipping 5141 matching lines...) Expand 10 before | Expand all | Expand 10 after
5253 #endif // V8_INTERPRETED_REGEXP 5254 #endif // V8_INTERPRETED_REGEXP
5254 5255
5255 return compiler.Assemble(&macro_assembler, 5256 return compiler.Assemble(&macro_assembler,
5256 node, 5257 node,
5257 data->capture_count, 5258 data->capture_count,
5258 pattern); 5259 pattern);
5259 } 5260 }
5260 5261
5261 5262
5262 }} // namespace v8::internal 5263 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698