mirror of
https://github.com/dart-lang/sdk
synced 2024-09-20 02:39:27 +00:00
Fix problems due to unit testing of the compiler.
Review URL: https://codereview.chromium.org//11308227 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15400 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
695b2f9160
commit
65a0ccaa3b
|
@ -782,7 +782,7 @@ class JavaScriptBackend extends Backend {
|
|||
jsStringClass.lookupLocalMember(const SourceString('length'));
|
||||
|
||||
for (ClassElement cls in classes) {
|
||||
interceptedClasses[cls] = null;
|
||||
if (cls != null) interceptedClasses[cls] = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1712,6 +1712,8 @@ if (typeof document !== 'undefined' && document.readyState != 'complete') {
|
|||
*/
|
||||
void emitGetInterceptorMethods(CodeBuffer buffer) {
|
||||
JavaScriptBackend backend = compiler.backend;
|
||||
// If no class needs to be intercepted, just return.
|
||||
if (backend.objectInterceptorClass == null) return;
|
||||
String objectName = namer.isolateAccess(backend.objectInterceptorClass);
|
||||
backend.specializedGetInterceptors.forEach(
|
||||
(String key, Collection<ClassElement> classes) {
|
||||
|
|
|
@ -54,6 +54,10 @@ const String DEFAULT_INTERCEPTORSLIB = r'''
|
|||
class JSString {
|
||||
var length;
|
||||
}
|
||||
class JSNumber {
|
||||
}
|
||||
class ObjectInterceptor {
|
||||
}
|
||||
getInterceptor(x) {}''';
|
||||
|
||||
const String DEFAULT_CORELIB = r'''
|
||||
|
|
|
@ -34,6 +34,9 @@ Future<String> provider(Uri uri) {
|
|||
eqNullB(a) {}""";
|
||||
} else if (uri.path.endsWith('_patch.dart')) {
|
||||
source = '';
|
||||
} else if (uri.path.endsWith('interceptors.dart')) {
|
||||
source = """class ObjectInterceptor {}
|
||||
var getInterceptor;""";
|
||||
} else if (uri.path.endsWith('js_helper.dart')) {
|
||||
source = 'library jshelper; class JSInvocationMirror {}';
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue