Permalink
Browse files

remove addMeta

  • Loading branch information...
lepture committed Apr 2, 2013
1 parent c2c3f10 commit e7af0ee13b37d8f34036241ec4270160b639f77f
Showing with 0 additions and 30 deletions.
  1. +0 −27 src/class.js
  2. +0 −3 tests/class-spec.js
View
@@ -119,9 +119,6 @@ define(function(require, exports, module) {
// Set a convenience property in case the parent's prototype is
// needed later.
this.superclass = parent.prototype
-
- // Add module meta information in sea.js environment.
- addMeta(proto)
},
'Implements': function(items) {
@@ -197,28 +194,4 @@ define(function(require, exports, module) {
}
return -1
}
-
-
- var getCompilingModule = module.constructor._getCompilingModule
-
- function addMeta(proto) {
- if (!getCompilingModule) return
-
- var compilingModule = getCompilingModule()
- if (!compilingModule) return
-
- var filename = compilingModule.uri.split(/[\/\\]/).pop()
-
- if (Object.defineProperties) {
- Object.defineProperties(proto, {
- __module: { value: compilingModule },
- __filename: { value: filename }
- })
- }
- else {
- proto.__module = compilingModule
- proto.__filename = filename
- }
- }
-
})
View
@@ -346,9 +346,6 @@ define(function(require) {
expect(dog.isAnimal).to.equal(true)
expect(dog.isDog).to.equal(true)
- expect(dog.__filename).to.equal('dog.js')
- expect(dog.__module.dependencies.length).to.equal(1)
-
})
})

0 comments on commit e7af0ee

Please sign in to comment.